Spawn HP bug
#1

Hello,

I have bug in my GM and i didn't know where is it.
When player spawn, he die.

I set the HP to 100 and same.

In callback login: HP = 100.
In callback OnPlayerSpawn: HP = 0.

What is wrong?
Reply
#2

You've it set to kill the player on

OnPlayerSpawn -

Make it OnplayerSpawn HP =100 lol, replace the "0" and make it "100"
Reply
#3

There might be like this on your spawn
pawn Код:
public OnPlayerSpawn(playerid)
{
   SetPlayerHealth(playerid,0);//Player's health sets to 0,so the player dies.
   return 1;
}
Change it to this :
pawn Код:
public OnPlayerSpawn(playerid)
{
   SetPlayerHealth(playerid,100.00);//Player's health becomes full here.
   return 1;
}
Reply
#4

OnPlayerSpawn:

GivePlayerHealthEx(playerid, PlayerInfo[playerid][health], true);

PlayerInfo[playerid][health] is 100. And it give 0.

Any idea?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)