Forum

> > CS2D > Scripts > Disable parse command
Forums overviewCS2D overview Scripts overviewLog in to reply

English Disable parse command

7 replies
To the start Previous 1 Next To the start

old Disable parse command

Quattro
GAME BANNED Off Offline

Quote
I have this code preventing from using kill command and resetting stored CT/TT score upon restart:

1
2
3
4
5
6
addhook("parse", "control_parse")

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 works on private server but on dedicated it is ignored? (Tried it with /kill)

old Re: Disable parse command

Yates
Reviewer Off Offline

Quote
Try the cs2d lua hook rcon hook for dedicated.

Don't ask why

More >
edited 1×, last 14.06.18 02:41:53 pm

old Re: Disable parse command

Quattro
GAME BANNED Off Offline

Quote
Hmm at least it means restart function works.

I'm trying out rcon hook now but it only activates if you enter rcon password and use commands via console.

Gotta figure out how to prevent players from killing themselves lol

edit: It seems the best solution is to add flags for team switch and use die hook to kick/ban player if he died other way than team switch.

edit2: omg Talented Doge, there really is suicide hook already Your solution works
edited 2×, last 14.06.18 04:23:48 pm

old Re: Disable parse command

Quattro
GAME BANNED Off Offline

Quote
@user Yates:

Yeah I wrote that yesterday but today I couldn't find that topic anywhere so I made a new one

Admin/mod comment

Note that there's "Recent activity" tab on your profile where you can see posts/comments you made. // user Rainoth
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview