English Disable /kill

13 replies
Goto Page
To the start Previous 1 Next To the start
23.12.12 08:59:00 am
Up
VerteX
User
Offline Off
Is there a way to disable "/kill" command?
If so, please tell me.
23.12.12 09:28:28 am
Up
Sparty
Reviewer
Offline Off
If you make a lua for it or I don't know if you can Disable it. You may ask people.
user DC has written:
@user omg: Actually a pretty good idea...
23.12.12 09:35:04 am
Up
Cure Pikachu
User
Offline Off
Code:
1
2
3
4
5
6
addhook("parse","disable")
function disable(cmd)
     if cmd == "kill" then
          return 2
     end
end
IMG:https://i.imgur.com/5UWPaft.png
IMG:https://i.imgur.com/xpsyQRX.png
23.12.12 09:55:27 am
Up
VerteX
User
Offline Off
It doesn't work. I can still use the command.
23.12.12 09:58:22 am
Up
Alistaire
User
Offline Off
You can't.
IMG:http://i.imgur.com/5zhwOTP.png
23.12.12 10:21:59 am
Up
Code:
1
2
3
4
5
6
addhook("say","disable")
function disable(id,txt)
     if txt=="/kill" then
          return 1
     end
end

Untested
23.12.12 11:17:33 am
Up
Alistaire
User
Offline Off
You can always use the console to "/kill". So it's impossible.
IMG:http://i.imgur.com/5zhwOTP.png
23.12.12 11:19:24 am
Up
palomino
User
Offline Off
user 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.
zugcxdxtczgvhioj
23.12.12 12:32:00 pm
Up
EngiN33R
Moderator
Offline Off
user VerteX has written:
It doesn't work. I can still use the command.


user Cure Pikachu's code works for me. Are you doing everything right?
I code, therefore I exist. | Visit my blog for Lua tips and other interesting info
23.12.12 01:05:08 pm
Up
VerteX
User
Offline Off
I forgot to restart my dedi server O_O. It's working now, Thanks
25.12.12 06:06:44 pm
Up
DarkLight66
User
Offline Off
You could just type "kill" on console and it will do the same thing.
Paradox
14.06.18 01:03:42 am
Up
Quattro
User
Offline Off
Code:
1
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?
14.06.18 05:06:58 am
Up
Cure Pikachu
User
Offline Off
@user Quattro: Because command parsing is done server-sided. It's for this reason that the cs2d lua hook suicide hook is created.
(We didn't knew any better like 5.5 years ago)
IMG:https://i.imgur.com/5UWPaft.png
IMG:https://i.imgur.com/xpsyQRX.png
14.06.18 04:11:02 pm
Up
px20
GAME BANNED
Offline Off
What about cs2d lua hook suicide?
To the start Previous 1 Next To the start