PDA

View Full Version : What is going on here? Anybody an idea.


RSC_Quicker
14/04/2010, 08:34 PM
Hello. I made a new GM for a while now. I already scripted over 8000 lines. Almost hosted list.
But suddenly this bug came up:
http://addy.md-design.be/Bugreport_hallo.swf
Sometimes I die normaly. But most of the times like the move above.
I already checked my OnPlayerDeath and OnPlayerSpawn but there is nothing wrong.
Somebody had this bug too? Somebody know how to solve it?

dugi
14/04/2010, 08:36 PM
There is a solution for this bug posted in: http://forum.sa-mp.com/index.php?topic=139748.0

RSC_Quicker
14/04/2010, 08:51 PM
Thanks I read the topic , There was not a solve but I got alot more information about it now thanks.

Jay_
15/04/2010, 12:50 PM
For anyone who doesn't want to read 4 pages of replies, the solutions are these:

Set the players health to 100 in OnPlayerDeath.


public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerHealth(playerid, 100);
}

And the other solution was to use ClearAnimations, again in OnPlayerDeath.


public OnPlayerDeath(playerid, killerid, reason)
{
ClearAnimations(playerid);
}

Note: I'm not sure if these work, I'm only quoting them from the topic.

[MWR]Blood
15/04/2010, 02:17 PM
For anyone who doesn't want to read 4 pages of replies, the solutions are these:

Set the players health to 100 in OnPlayerDeath.


public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerHealth(playerid, 100);
}

And the other solution was to use ClearAnimations, again in OnPlayerDeath.


public OnPlayerDeath(playerid, killerid, reason)
{
ClearAnimations(playerid);
}

Note: I'm not sure if these work, I'm only quoting them from the topic.

Impossible to work, especially the first one.I don't know how Clearing the Animations of a player will help.
Setting his health to 100 makes him immortal...

Jay_
15/04/2010, 03:11 PM
No it doesn't. When OnPlayerDeath is called the player is already dead. Setting player health in this callback won't work. I'm not sure how it fixes the reported issue but according to the feedback it does.

Clearing the animations will (presumably) prevent the player from running around and hopefully re-apply the relevant death animation.

RSC_Quicker
15/04/2010, 07:45 PM
Well. Clearing the animations didn't work, I tried that before.
I will see what happends when I set the playerhealth to 100 in onplayerdeath.
Also I already changed my /kill so it works. But still they die on other ways.
Is sa-mp going to repair this in the next versions?

bpeterson
17/04/2010, 11:21 AM
I'm using ClearAnimations(playerid); in my gamemode. It works fine. Altought it's pretty annoying when you die, it resets your animations and you will just stay for a sec then die.

RSC_Quicker
18/04/2010, 12:44 AM
I'm using ClearAnimations(playerid); in my gamemode. It works fine. Altought it's pretty annoying when you die, it resets your animations and you will just stay for a sec then die.


Nah it doesn't work fine. Use SetPlayerHealth(playerid,100); at OnPlayerDeath
That works fine for me.

bpeterson
20/04/2010, 10:56 AM
Yes, thanks. It's working fine.