Player dosen't respawn after OnPlayerDeath -
BullseyeHawk - 20.08.2013
I have tried to make a "body" system, and I have wanted that the player that dies will actually stay on the ground with the blood pool with the skin.
I can't understand why won't it'd stuck inside OnPlayerDeath without calling OnPlayerSpawn yet. (return 0 or return 1 of OnPlayerSpawn), I have read about the sync system of SA:MP but cancling sync of OnPlayerSpawn / OnPlayerDeath or anything basicly, it won't work correctly.
Is there any suggestion/ideas how to make the body of the player stay in the same place?
There was once a bug at RC4 0.3b if I am correct, that the player stood in the same position without any health(0 health) and could walk, OnPlayerDeath was called. But he could have been killed ONLY by if you'd fall a little(nature physics). Does anyone have an idea how to re-create that bug and use it(the player is fully synced) and then just making the player in an animation and hiding his name, and he'd count as a body?
All I need help with, is somehow to recreate the bug I have told about in the pervious(^).
(( The player is fully synced during that bug in RC4. So de-syncing players would cause in problems, unless it's a place where the player won't use much. Or just on anything basicly that contacts the player without hurting him after the respawn. ))
I do not need those scripts that after OnPlayerDeath, OnPlayerSpawn is called and it spawns you back in. I need something that re-creates somehow the bug that was in RC4, or if there is anything else that I can use. It'd be even better!
Thanks for any help!
Re: Player dosen't respawn after OnPlayerDeath -
JimmyCh - 20.08.2013
Hmm I don't really know how it's done, but I got an idea on how to do it.
Let's try it out, so..
Try like doing:
pawn Код:
if(GetPlayerHealth(playerid) < 1)
{
SetPlayerHealth(playerid, 1);
//do an animation of falling, FALL_fall I think
TogglePlayerControllable(playerid, 0);
}
Simple way which would do your needs, try it out and tell us :3
Re: Player dosen't respawn after OnPlayerDeath -
BullseyeHawk - 20.08.2013
That's not even close..
I have tried different ways by trying to desync the client. Tought it didn't work. (It's a fake desync, of course)
I have found some picutres of the bug, and I need to re-create it. That way my script workes a couple of times, meaning when it detectes that the player needs to really die. I want it to do this:
It'll just be desync in one place, untill I call it to respawn the player.
Re: Player dosen't respawn after OnPlayerDeath -
JimmyCh - 20.08.2013
Did you even try my suggestion?
I'd say it would work.
Re: Player dosen't respawn after OnPlayerDeath -
BullseyeHawk - 20.08.2013
I know what your suggestion is doing, no it's not the working one... (Yes I did test it..)
I need the body to stay on the ground, it just respawns. I need that the player would die clientside and then just stay on the ground with 0 health(clientside would be standing up). Check the two pictures for more info..
Respuesta: Player dosen't respawn after OnPlayerDeath -
Strier - 21.08.2013
That's impossible... unless you apply an animation "Fall_fall" or whatever when the player has < 1.0 or idk..