English Disable parse command

7 replies
Goto Page
To the start Previous 1 Next To the start
14.06.18 02:20:27 pm
Up
Quattro
User
Offline Off
I have this code preventing from using kill command and resetting stored CT/TT score upon restart:

Code:
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)
14.06.18 02:29:44 pm
Up
Yates
Reviewer
Offline Off
Try the cs2d lua hook rcon hook for dedicated.

Don't ask why

More >
edited 1×, last 14.06.18 02:41:53 pm
14.06.18 04:02:47 pm
Up
Talented Doge
User
Offline Off
Why don't you use the suicide hook?
14.06.18 04:07:24 pm
Up
Quattro
User
Offline Off
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
14.06.18 04:21:49 pm
Up
Yates
Reviewer
Offline Off
@user Quattro: That's correct. But when will players be able to use restart without using RCon?
14.06.18 04:24:35 pm
Up
Quattro
User
Offline Off
We can close this topic, give talented doge a cookie and use suicide hook for easylife
14.06.18 04:31:34 pm
Up
Yates
Reviewer
Offline Off
user Talented Doge is indeed very talented but you forgot that your old post also got responses:

http://www.unrealsoftware.de/forum_posts.php?post=343559&goto=421418#post421418

15.06.18 12:29:50 am
Up
Quattro
User
Offline Off
@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