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 :) :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.
[b][url=http://wiki.garrysmod.com/?title=Cvars.AddChangeCallback]Cvars.AddChangeCallback [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[PHP]function CallForchatthing(ply, say, teamsay)
--something
end
hook.Add("PlayerSay","CallForchatthing_ChatHook",CallForchatthing)
end[/PHP]
something similair to this, i just want it to hook if you type a something in the command.
*Smack* :3:
Sorry, you need to Log In to post a reply to this thread.