Advertisement
wifiboost

JAILPOS

Sep 7th, 2017
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. local function storeJail(ply, add, hasAccess)
  2. if not IsValid(ply) then return end
  3.  
  4. -- Admin or Chief can set the Jail Position
  5. if (RPExtraTeams[ply:Team()] and RPExtraTeams[ply:Team()].chief and GAMEMODE.Config.chiefjailpos) or hasAccess then
  6. DarkRP.storeJailPos(ply, add)
  7. else
  8. local str = DarkRP.getPhrase("admin_only")
  9. if GAMEMODE.Config.chiefjailpos then
  10. str = DarkRP.getPhrase("chief_or") .. str
  11. end
  12.  
  13. DarkRP.notify(ply, 1, 4, str)
  14. end
  15. end
  16. local function JailPos(ply)
  17. CAMI.PlayerHasAccess(ply, "SetHealth", fp{storeJail, ply, false})
  18.  
  19. return ""
  20. end
  21. DarkRP.defineChatCommand("jailpos", JailPos)
  22. DarkRP.defineChatCommand("setjailpos", JailPos)
  23.  
  24. local function AddJailPos(ply)
  25. CAMI.PlayerHasAccess(ply, "SetHealth", fp{storeJail, ply, true})
  26.  
  27. return ""
  28. end
  29. DarkRP.defineChatCommand("addjailpos", AddJailPos)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement