I'm currently hooking into concommand.Run, but I'm pretty sure that's not the way it should be done. Does anyone have a better suggestion?
[lua]evolve.oldConcommand = concommand.Run
function concommand.Run( ply, com, args )
if ( com == "rateuser" ) then
local target = args[1]
local rating = args[2]
if ( tonumber( target ) and ValidEntity( ents.GetByIndex( target ) ) and rating ) then
evolve:notify( ply, evolve.colors.blue, ply:Nick( ), evolve.colors.white, " rated you ", evolve.colors.red, " " .. rating, evolve.colors.white, "." )
end
end
return evolve.oldConcommand( ply, com, args )
end[/lua]
[b]Edit:[/b] It seems everything that has something to do with the scoreboard is localized, so I don't have access to it from my script.
I thought you had to use engineConsoleCommand?
Sorry, you need to Log In to post a reply to this thread.