I need help finishing a ulx command.

How do i make a menu that shows how many times a person was warned? Or at least get a message that says “NAME was warned “1” times for RDM”

[lua]local CATEGORY_NAME = “Custom”
my_warn_reasons = { “Spamming”, “Rude”, “Language”, “Arguing with a mod”, “Prop Killing”, “Bad or Innappropriate name”}
function ulx.warn( calling_ply, target_plys, Reason )
return true
end
local warn = ulx.command( CATEGORY_NAME, “ulx warn”, ulx.warn, “!warn” )
warn:addParam{ type=ULib.cmds.PlayerArg }
warn:addParam{ type=ULib.cmds.StringArg, hint=“reason”, completes=my_warn_reasons, ULib.cmds.takeRestOfLine }
warn:defaultAccess( ULib.ACCESS_ADMIN )
warn:help( “Warn a player.” )
warn:logString( “#1s warned #2s for #3s” )[/lua]



local CATEGORY_NAME = "Custom"
my_warn_reasons = { "Spamming", "Rude", "Language", "Arguing with a mod", "Prop Killing", "Bad or Innappropriate name"}
for _,y in pairs (player.GetAll() ) do
y:SetVar( "warns", 0 )
end
function ulx.warn( calling_ply, target_plys, Reason )
local times = target_ply:GetVar( "warns" )
target_ply:SetVar( "warns", times + 1 )
target_ply:SendLua( "chat.AddText( /"You have been warned!/" )
end
local warn = ulx.command( CATEGORY_NAME, "ulx warn", ulx.warn, "!warn" )
warn:addParam{ type=ULib.cmds.PlayerArg }
warn:addParam{ type=ULib.cmds.StringArg, hint="reason", completes=my_warn_reasons, ULib.cmds.takeRestOfLine }
warn:defaultAccess( ULib.ACCESS_ADMIN )
warn:help( "Warn a player." )
warn:logString( "#1s warned #2s for #3s" )


untested. Just make another command that used getvar to get the amount of times

[editline]3rd July 2014[/editline]