The problem with death and spawn.
#1

So I ran into an interesting problem. In the video below, I showed where I have a problem (in the middle of the video).
Description of the problem:
I put the latest version of Musk R39-2 (such as it is called). Put all of the latest modules, etc.
Description of the problem: After attack player or or a fall from a great height, and must die, it becomes 0 xn and continues to live, until someone does not hit or it will not get damage. In Pawno изменять, удалять все, что может, вероятно, проблема не решена.. Sobeys also deleted, changed the GTA. Ie most likely a bug in modules or somewhere. It is also interesting work, then 1 time a bug is when you enter, the second time no errors. That bug is, it does not have the bug. For example, if the bug is not gone and then after restarting the GTA bug disappears. Asked many scripters, they all say do not know how to solve the problem. Here's the video, I'm waiting for your help.
Immediately apologize for the text, I wrote it through a translator.

https://www.youtube.com/watch?v=S7CF...SyPPzOZFQ0Qk6g
Reply
#2

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
new Float:health;
GetPlayerHealth(damagedid,health);
if(health == 0)
{
SetPlayerHealth(damagedid,-2);
}
return 1;
}
Reply
#3

Quote:
Originally Posted by Eth
Посмотреть сообщение
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
new Float:health;
GetPlayerHealth(damagedid,health);
if(health == 0)
{
SetPlayerHealth(damagedid,-2);
}
return 1;
}
And then there are the options?
Today I will try this method, do not not sure that it will help.
In any case, thank you for that.
Reply
#4

UP!
I tried your way, but it did not help me . Please someone help me with her ​​professional challenge , I spent a lot of his time and the problem has not been solved.
Reply
#5

Pretty sure that this is not the way to solve it; But if I've got this problem, and didn't get/have a solution, I might use it like this:

Inside OnGameModeInit()
pawn Код:
SetTimer("CheckHP", 1000, 1);

Anywhere in your script
pawn Код:
forward CheckHP();
public CheckHP()
{
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(GetPlayerHealth(i) <= 0)
{
SpawnPlayer(i);
}
}
return 1;
}
Reply
#6

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SetPlayerHealth(playerid,100);
   //code
   return 1;
}
This fixed the problem when i had it.
Reply
#7

Additional information about the bug .
I tried to find the cause of the bug , and began to turn off all that is in vogue. But even after the factuality cleared all modes ( left the latest plug-ins , etc.) bug was back . I have the view that a bug not in the fashion, and a bug in something else , but I can not understand.
If you have a bug, you can get out of the GTA and re-enter, then the bug will not.
Please help.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)