From cd4864764045fefbf74ce4702309709f38c48c03 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Tue, 6 Nov 2018 20:59:00 +0000 Subject: [PATCH] Player Rank COmmand Validation Allows Self --- modules/ExpGamingCore/Role/src/commands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ExpGamingCore/Role/src/commands.lua b/modules/ExpGamingCore/Role/src/commands.lua index 158b32b8..612a781a 100644 --- a/modules/ExpGamingCore/Role/src/commands.lua +++ b/modules/ExpGamingCore/Role/src/commands.lua @@ -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)