have 0 hp, health bar blinking, but i cant die (respawn)
#1

When i die sometimes (have 0 hp) health bar is blinking (showing/not showing) and i can walk, jump... do whatever. Im dead but i can do anything.

But when i jump from bigger height i make that death animation and respawn normally. It happens sometimes, but sometimes i continue to move even if i have 0 hp.

image:

http://i.imgur.com/Wpn1Tzq.png
Reply
#2

That can be reproduced when you set a player's health to anything above 0 while in death animation or when you die by fire.
Check if you set the health anywhere when possibly dead, maybe in OnPlayerTakeDamage or similar?

But there may be other causes too, which I don't know about.
Reply
#3

According to this topic: https://sampforum.blast.hk/showthread.php?tid=206343
@wups says use:
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate== PLAYER_STATE_WASTED) return 1;
}
Why not try it?
Reply
#4

Here is OnPlayerTakeDamage... i only put when hitman headshot you with sniper, and check for when you are admin on duty and if someone is shooting at you, he will get 999.. health...

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
		if(AdminDuty[playerid] == 1){SetPlayerHealth(playerid, 9999);}//DUTY HP REGENERATE
	   	if(PlayerInfo[issuerid][pMember] == 6){if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9){SetPlayerHealth(playerid, 0.0); SetPlayerArmour(playerid, 0.0);}}//HITMAN HS SYSTEM
    }
    return 1;
}
I dont know what is this glitch


@Godey, i just put this line: if(newstate== PLAYER_STATE_WASTED) return 1;

and it might work?
Reply
#5

I haven't tested it, so I'm not saying it will work 100%
According to that, it will. So why not just try?
Reply
#6

Quote:
Originally Posted by Saddin
Посмотреть сообщение
Here is OnPlayerTakeDamage... i only put when hitman headshot you with sniper, and check for when you are admin on duty and if someone is shooting at you, he will get 999.. health...

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
		if(AdminDuty[playerid] == 1){SetPlayerHealth(playerid, 9999);}//DUTY HP REGENERATE
	   	if(PlayerInfo[issuerid][pMember] == 6){if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9){SetPlayerHealth(playerid, 0.0); SetPlayerArmour(playerid, 0.0);}}//HITMAN HS SYSTEM
    }
    return 1;
}
I dont know what is this glitch


@Godey, i just put this line: if(newstate== PLAYER_STATE_WASTED) return 1;

and it might work?
Did any of the above conditions meet when you encountered the bug?

I mean, were you on admin duty while someone else killed you? In case you suicided OnPlayerTakeDamage did not cause it.

Godey's suggestion is a good idea though, if you have any code in OnPlayerKeyState that could be executed when dying you should add the line he suggested at the beginning of the callback.
Reply
#7

I went now onduty as admin, and /kill myself and it set me like this, death with 0hp but can walk (alive)

when i kill somebody else on duty, he die normally

when i kill myself for example /kill i can walk, when i turn off duty, i respawn normally, now i will try removing this onplayertakedamage.. with adminduty this stuff and test it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)