prevent bringing someone to your own rank

This commit is contained in:
octacian 2016-08-25 16:08:24 -07:00
parent 6448b80b1e
commit a607b27ac0

View File

@ -76,7 +76,7 @@ function servertools.set_player_rank(from, name, newrank)
end
-- check level
if servertools.get_rank_level(servertools.get_player_rank(from)) < servertools.get_rank_level(newrank) then
if servertools.get_rank_level(servertools.get_player_rank(from)) <= servertools.get_rank_level(newrank) and servertools.get_player_rank(from) ~= "owner" then
return "You cannot set the rank of "..name.." to a rank of higher level than your own."
end