prevent player from respawning
#1

Hi guys,
I'm wondering whether there is a way to prevent the player from respawning after death...
I want the player to stay in his death position for a while (so basicly maybe set his health to 1 when he dies).
But if I'm correct, setting the health to 1 when the player is dead doesn't affect anything.

So is there a way (without using a health check at "OnPlayerUpdate") to freeze the player at the spot he died with maybe a HP of 1?
Reply
#2

What you can simply do is put the play in Spectate mode just where he died maybe?
Reply
#3

Well, I would simply set the player's position to the old spot after respawning, but I want a fluent screen, without the player being at another position for a short time on the player's screen...

so something that would even prevent him from respawning would be nice...
Reply
#4

You could also try to set player's camera to look at the place where he died, that is an idea;
Reply
#5

yea, but the camera would be moved for a short time when the player respawns... and then it wouldn't be fluently againD:
Reply
#6

Maybe you can do the following:
pawn Код:
//We're OnPlayerDeath now
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
/* then of course, since u want him to stay at that spot after death, you can even create a timer for this, on which he will stay there, maybe also an animation of him laying on the ground */
SetPlayerPos(playerid, X, Y,Z);
//ApplyAnimation(playerid,"PED","FALL_back",4.1,1,1,1,1,25000,1);
//U can add the thing up so its an animation for 25 seconds..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)