Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ulx.bpromote( calling_ply, target_plys )
- if target_plys:GetRank() > calling_ply:GetRank() then
- if target_plys:Team() != calling_ply:Team() then return
- end
- for i = 1, #target_plys do
- local v = target_plys[ i ]
- local therank = v:GetRank()
- if therank == nil then
- v:SetRank( "0" )
- end
- local hackyrank = v:GetRank() or 1
- v:SetRank(hackyrank + 1)
- GetCorrectRankUp( v, v:GetRank(), false )
- end
- ulx.fancyLogAdmin( calling_ply, "#A promoted #T", affected_plys )
- end
- local bpromote = ulx.command( CATEGORY_NAME, "ulx bpromote", ulx.bpromote, "!bpromote" )
- bpromote:addParam{ type=ULib.cmds.PlayersArg }
- bpromote:defaultAccess( ULib.ACCESS_ADMIN )
- bpromote:help( "Promotes target(s)." )
- function ulx.apromote( calling_ply, target_plys )
- for i = 1, #target_plys do
- local v = target_plys[ i ]
- local therank = v:GetRank()
- if therank == nil then
- v:SetRank( "0" )
- end
- local hackyrank = v:GetRank() or 1
- v:SetRank(hackyrank + 1)
- GetCorrectRankUp( v, v:GetRank(), false )
- end
- ulx.fancyLogAdmin( calling_ply, "#A promoted #T", affected_plys )
- end
- local apromote = ulx.command( CATEGORY_NAME, "ulx apromote", ulx.apromote, "!apromote" )
- apromote:addParam{ type=ULib.cmds.PlayersArg }
- apromote:defaultAccess( ULib.ACCESS_ADMIN )
- apromote:help( "Admin Promotes target(s)." )
Add Comment
Please, Sign In to add comment