Cs2d lua script


SUBMITTED BY: Guest

DATE: Feb. 11, 2014, 1:56 p.m.

FORMAT: Lua

SIZE: 3.3 kB

HITS: 2078

  1. ContrucaoRapida=1
  2. RapidoUpgrade=0
  3. Gratis=1
  4. Ilimitado=1
  5. Extra=0
  6. addhook("buildattempt","fast_build")
  7. addhook("objectupgrade","fast_upgrade")
  8. building_names = {"Barricade","Barbed Wire","Wall I","Wall II","Wall III","Gate Field","Dispenser","Tiple Turret","Supply",[13] = "Teleporter Entrance",[14] = "Teleporter Exit","Mine","Laser Mine"}
  9. function spawn_object(id,type,x,y)
  10. parse("spawnobject "..type.." "..x.." "..y.." 0 100 "..player(id,"team").." "..id)
  11. end
  12. function fast_build(id,type,x,y)
  13. if (ContrucaoRapida==1) then
  14. if(building_names[type]) then
  15. spawn_object(id,type,x,y)
  16. return 1
  17. end
  18. end
  19. end
  20. function fast_upgrade(id,idp,progress,total)
  21. if (RapidoUpgrade==1) then
  22. local x=object(id,"tilex")
  23. local y=object(id,"tiley")
  24. local type=object(id,"type")
  25. local rot=object(id,"rot")
  26. local team=player(idp,"team")
  27. local idp=object(id,"player")
  28. local mode=object(id,"mode")
  29. if type==8 then type=12
  30. elseif type==9 then type=15
  31. elseif type==1 then type=20
  32. elseif type==4 then type=21
  33. end
  34. parse('effect "flare" '..x..' '..y..' 25 50 000 255 000')
  35. parse("killobject "..id)
  36. parse("spawnobject "..type.." "..x.." "..y.." "..rot.." "..mode.." "..team.." "..idp)
  37. return 1
  38. end
  39. end
  40. if (Gratis==1) then
  41. parse('mp_building_price "Barricade" "0"')
  42. parse('mp_building_price "Barbed Wire" "0"')
  43. parse('mp_building_price "Wall I" "0"')
  44. parse('mp_building_price "Wall II" "0"')
  45. parse('mp_building_price "Wall III" "0"')
  46. parse('mp_building_price "Gate Field" "0"')
  47. parse('mp_building_price "Turret" "0"')
  48. parse('mp_building_price "Dispenser" "0"')
  49. parse('mp_building_price "Supply" "GRatis"')
  50. parse('mp_building_price "Teleporter Entrance" "0"')
  51. parse('mp_building_price "Teleporter Exit" "0"')
  52. parse('mp_building_price "Mine" "0"')
  53. end
  54. if (Ilimitado==1) then
  55. parse('mp_building_limit "Barricade" "50"')
  56. parse('mp_building_limit "Barbed Wire" "50"')
  57. parse('mp_building_limit "Wall I" "50"')
  58. parse('mp_building_limit "Wall II" "30"')
  59. parse('mp_building_limit "Wall III" "15"')
  60. parse('mp_building_limit "Gate Field" "20"')
  61. parse('mp_building_limit "Turret" "5"')
  62. parse('mp_building_limit "Dispenser" "1"')
  63. parse('mp_building_limit "Supply" "1"')
  64. parse('mp_building_limit "Teleporter Entrance" "2"')
  65. parse('mp_building_limit "Teleporter Exit" "2"')
  66. end
  67. if (Extra==1) then
  68. parse('mp_building_health "Wall III" 99999999999999')
  69. parse('mp_building_health "Gate Field" 99999999999999')
  70. parse('mp_building_health "Barbed Wire" 99999999999999')
  71. parse('mp_supply_items 83,90,91,3')
  72. parse('mp_damagefactor 1.0')
  73. parse('mp_wpndmg USP 9999999999999999')
  74. parse('mp_wpndmg Deagle 9999999999999999')
  75. parse('mp_wpndmg P90 9999999999999999')
  76. parse('mp_killteambuildings 1')
  77. parse('mp_dispenser_health 100')
  78. parse('mp_teamkillpenalty 9999')
  79. end

comments powered by Disqus