If so, please tell me.
Forum
General
Disable /kill
Disable /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 writtenYou 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 writtenIt 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?
Quattro: Because command parsing is done server-sided. It's for this reason that the
suicide hook is created.(We didn't knew any better like 5.5 years ago)
suicide?
1

Offline