Player Rank COmmand Validation Allows Self

This commit is contained in:
Cooldude2606
2018-11-06 20:59:00 +00:00
parent bcac04888f
commit cd48647640

View File

@@ -3,7 +3,7 @@ local Role = self
commands.add_validation('player-rank',function(value,event)
local player,err = commands.validate['player'](value)
if err then return commands.error(err) end
local rtn = Role.get_highest(player).index > Role.get_highest(event).index and player or nil
local rtn = Role.get_highest(player).index > Role.get_highest(event).index and player or player.index == event.player_index and player or nil
if not rtn then return commands.error{'ExpGamingCore_Command.error-player-rank'} end return rtn
end)