Guest User

Untitled

a guest
Aug 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. -- place those codes before chat hook.
  2. BuildLimit={}; TURRET_LIMIT=5;
  3.  
  4.  
  5. if Message == "!turret" then
  6. local pos = Get_Position(Get_GameObj(pID))
  7. if Get_Money(pID) < 1000 then
  8. InputConsole("ppage %d You need 1000 credits", pID)
  9. else
  10. if BuildLimit[pID] == nil then BuildLimit[pID]=0 end
  11.  
  12. if BuildLimit[pID] > TURRET_LIMIT then
  13. InputConsole("ppage %d Turret limit reach.", pID)
  14. return
  15. end
  16.  
  17. pos.Z = pos.Z + 0
  18. pos.X = pos.X + 5
  19. reinf = Create_Object("Nod_Turret_MP_Improved", pos)
  20. Disable_Physical_Collisions(Get_GameObj(pID))
  21. if reinf == nil then
  22. InputConsole("ppage %d Error creating backup / support", pID)
  23. else
  24. Set_Money(pID, Get_Money(pID)-1000)
  25. end
  26. end
  27. end
Add Comment
Please, Sign In to add comment