prevent bringing someone to your own rank
This commit is contained in:
parent
6448b80b1e
commit
a607b27ac0
2
rank.lua
2
rank.lua
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user