Can't force a player to suicide.

Please post any questions about developing your plugin here. Please use the search function before posting!
Predz
Senior Member
Posts: 158
Joined: Wed Aug 08, 2012 9:05 pm
Location: Bristol, United Kingdom

Can't force a player to suicide.

Postby Predz » Wed May 13, 2015 8:51 am

I have tried multiple ways to force a player to suicide but none seem to work. First off the client "kill" command has the SERVER_CANNOT_EXECUTE flag, and every time I try to kill them with either <PlayerEntity>.damage or <PlayerEntity>.take_damage, the server crashes if the damage is more than their current health. It will damage them if the damage value doesn't kill them but otherwise server just crashes. Any help would be much appreciated. :D
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Wed May 13, 2015 10:27 am

In the next release you will be able to execute the kill command. https://github.com/Source-Python-Dev-Team/Source.Python/commit/34d0d4aed50f84d4e6b178639e94faa9f6fd0552

Can you provide a test script that reproduces the crashes?
necavi
Developer
Posts: 129
Joined: Wed Jan 30, 2013 9:51 pm

Postby necavi » Wed May 13, 2015 4:25 pm

User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Wed May 13, 2015 11:36 pm

Don't forget you have to call the writeid command manually for permanent bans beeing saved into banned_user.cfg.
necavi
Developer
Posts: 129
Joined: Wed Jan 30, 2013 9:51 pm

Postby necavi » Thu May 14, 2015 3:16 am

Right, thanks. Forgot to do so.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 141 guests