SA-MP Forums Archive
What is going on here? Anybody an idea. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: What is going on here? Anybody an idea. (/showthread.php?tid=141677)



What is going on here? Anybody an idea. - RSC_Quicker - 14.04.2010

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?


Re: What is going on here? Anybody an idea. - dugi - 14.04.2010

There is a solution for this bug posted in: http://forum.sa-mp.com/index.php?topic=139748.0


Re: What is going on here? Anybody an idea. - RSC_Quicker - 14.04.2010

Thanks I read the topic , There was not a solve but I got alot more information about it now thanks.


Re: What is going on here? Anybody an idea. - Jay_ - 15.04.2010

For anyone who doesn't want to read 4 pages of replies, the solutions are these:

Set the players health to 100 in OnPlayerDeath.

Code:
public OnPlayerDeath(playerid, killerid, reason)
{
  SetPlayerHealth(playerid, 100);
}
And the other solution was to use ClearAnimations, again in OnPlayerDeath.

Code:
public OnPlayerDeath(playerid, killerid, reason)
{
  ClearAnimations(playerid);
}
Note: I'm not sure if these work, I'm only quoting them from the topic.


Re: What is going on here? Anybody an idea. - [MWR]Blood - 15.04.2010

Quote:
Originally Posted by _Jay_
For anyone who doesn't want to read 4 pages of replies, the solutions are these:

Set the players health to 100 in OnPlayerDeath.

Code:
public OnPlayerDeath(playerid, killerid, reason)
{
  SetPlayerHealth(playerid, 100);
}
And the other solution was to use ClearAnimations, again in OnPlayerDeath.

Code:
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...


Re: What is going on here? Anybody an idea. - Jay_ - 15.04.2010

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.


Re: What is going on here? Anybody an idea. - RSC_Quicker - 15.04.2010

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?



Re: What is going on here? Anybody an idea. - bpeterson - 17.04.2010

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.


Re: What is going on here? Anybody an idea. - RSC_Quicker - 18.04.2010

Quote:
Originally Posted by bpeterson
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.


Re: What is going on here? Anybody an idea. - bpeterson - 20.04.2010

Yes, thanks. It's working fine.