Advertisement
Guest User

Untitled

a guest
Feb 7th, 2020
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. function HLRP.Job(name, team)
  2. print(name, team)
  3. team.vip = team.vip or false
  4.  
  5. team.cost = team.cost or 0
  6. team.time = team.time or 0
  7.  
  8. team.max = team.max or 0
  9. team.admin = team.admin or 0
  10. team.vote = team.vote or false
  11. team.hasLicense = team.hasLicense or false
  12.  
  13. team.customCheck = function(ply)
  14. if team.time > 0 and ply:GetTime() < team.time then
  15. HLRP.Notify(ply, 1, 4, "Недостаточно времени")
  16. return
  17. end
  18. if team.vip and not ply:IsVip() then
  19. HLRP.Notify(ply, 1, 4, "Необходима VIP-привилегия")
  20. return
  21. end
  22.  
  23. if ply:HasJob(name) or team.cost == 0 then return true end
  24.  
  25. if ply:BuyJob(name) then
  26. return true
  27. end
  28.  
  29. HLRP.Notify(ply, 1, 4, "Недостаточно средств для покупки")
  30. return false
  31. end
  32.  
  33. DarkRP.createJob(name, team)
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement