Solution to well-known death bug after a restart
#1

Hey all,

A pretty well know issue, once a restart has taken place, every following time a user dies they will have 0 HP and be able to walk around, shoot until their HP changes again or if they jump off a building or something. This is fixed once a user reconnects to the server.

Whats the best fix for this issue these days? I've tried setting the users HP back to 100 under OnPlayerDeath but that causes issues for players who've reconnected.

Cheers,
Haydz
Reply
#2

OnPlayerDeath is called even though this happens? If yes, you can create a mini explosion to the position of the player who died (visible only for them using CreateExplosionForPlayer).

Another ways might be to clear animations (not in OnPlayerDeath directly because it will look bugged so a timer (after 1-2 secs [not repeated]) probably) or setting the player's health to a negative value.
Reply
#3

Cheers @Konst,

OnPlayerDeath does work, so I tried the player explosion which didn't work.

Added the explosion / clear animations functions to a 2 second timer on death. They're called but didn't work.

Changed my restarting method and seemed to have solved the issue. To restart my server I was crashing it by opening a file which doesn't exist (I think this was the recommend way to do it back in the day).

I am now using SendRconCommand("gmx"); when restarting the server and all is working fine.

Cheers,
Hayden
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)