Advertisement
Prior_

Untitled

Nov 26th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. function ulx.bpromote( calling_ply, target_plys )
  2.  
  3. for i = 1, #calling_ply do
  4. local c = calling_ply[ i ]
  5. local callingrank = c:GetRank()
  6. end
  7.  
  8. for i = 1, #target_plys do
  9. local t = target_plys[ i ]
  10. local targetrank = t:GetRank()
  11. end
  12.  
  13. if t:GetRank() > c:GetRank() or t:Team() != c:Team() then // Line 17
  14. return
  15. end
  16.  
  17. // Default code shit under here.
  18.  
  19. if targetrank == nil then
  20. v:SetRank( "0" )
  21. end
  22.  
  23. local hackyrank = t:GetRank() or 1
  24. t:SetRank(hackyrank + 1)
  25.  
  26. GetCorrectRankUp( t, t:GetRank(), false )
  27. ulx.fancyLogAdmin( calling_ply, "#A promoted #T", affected_plys )
  28.  
  29. end
  30. local bpromote = ulx.command( CATEGORY_NAME, "ulx bpromote", ulx.bpromote, "!bpromote" )
  31. bpromote:addParam{ type=ULib.cmds.PlayersArg }
  32. bpromote:defaultAccess( ULib.ACCESS_ADMIN )
  33. bpromote:help( "Promotes target(s)." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement