why wont this work?

hello, how do i hook a console command?, i mean like if i type sv_cheats 1 in my console i will die for example.

//thank you :slight_smile: :biggrin:

IGNORE THE THREAD TITLE, i posted a other thing b4 until i changed my mind.

umm, mabey you could overwrite the console command by making a console command called sv_cheats and make it run a function that kills the player running it.

I think this is what you want.
**[Cvars.AddChangeCallback

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Cvars.AddChangeCallback)**

function CallForchatthing(ply, say, teamsay)
--something
         end
hook.Add("PlayerSay","CallForchatthing_ChatHook",CallForchatthing)
end

something similair to this, i just want it to hook if you type a something in the command.

-snip-
Punch me Iā€™m retarded.

Smack :3: