Forum

> > CS2D > Scripts > Disable parse command
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Disable parse command

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Disable parse command

Quattro
GAME BANNED Off Offline

Zitieren
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)

alt Re: Disable parse command

Yates
Reviewer Off Offline

Zitieren
Try the cs2d lua hook rcon hook for dedicated.

Don't ask why

Mehr >
1× editiert, zuletzt 14.06.18 14:41:53

alt Re: Disable parse command

Quattro
GAME BANNED Off Offline

Zitieren
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
2× editiert, zuletzt 14.06.18 16:23:48

alt Re: Disable parse command

Quattro
GAME BANNED Off Offline

Zitieren
@user Yates:

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

Admin/Mod Kommentar

Note that there's "Recent activity" tab on your profile where you can see posts/comments you made. // user Rainoth
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht