Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // !jobban
  2. function ulx.jobBan( calling_ply, target_ply, job )
  3. local newnum = nil
  4. local newname = nil
  5. for i,v in pairs( RPExtraTeams ) do
  6. if string.find( v.name, job ) != nil then
  7. newnum = i
  8. newname = v.name
  9. RunConsoleCommand( "rp_citizen", target_ply:Nick() )
  10. end
  11. end
  12. if newnum == nil then
  13. ULib.tsayError( calling_ply, "That job does not exist!", true )
  14. return
  15. end
  16. target_ply:teamBan( newnum, 0 )
  17. ulx.fancyLogAdmin( calling_ply, "#A has banned #T from job #s", target_ply, newname )
  18. end
  19. local jobBan = ulx.command( CATEGORY_NAME, "ulx jobban", ulx.jobBan, "!jobban" )
  20. jobBan:addParam{ type=ULib.cmds.PlayerArg }
  21. jobBan:addParam{ type=ULib.cmds.StringArg, hint="job" }
  22. jobBan:defaultAccess( ULib.ACCESS_ADMIN )
  23. jobBan:help( "Bans target from specified job." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement