If so, please tell me.
Forum
CS2D General Disable /killDisable /kill
13 replies 1
If so, please tell me.
1
2
3
4
5
6
2
3
4
5
6
addhook("parse","disable") function disable(cmd) 	if cmd == "kill" then 		return 2 	end end
1
2
3
4
5
6
2
3
4
5
6
addhook("say","disable") function disable(id,txt) 	if txt=="/kill" then 		return 1 	end end
Alistaire has written
You can always use the console to "/kill". So it's impossible.
You can always disable it the same way you can disable rcon commands. Just make it so that your USGN ID is the only one that can use the "kill" command.
VerteX has written
It doesn't work. I can still use the command.
Cure Pikachu's code works for me. Are you doing everything right?
1
2
3
4
2
3
4
function control_parse(cmd) 	if cmd == "kill" then return 2 end 	if cmd == "restart" then info[3]=0 info[4]=0 return end end
Can anyone explain why this blocks /kill command on my PC but on dedi it is ignored?
(We didn't knew any better like 5.5 years ago)
1