OnPlayerSpawn callback message duplicated or even start flood message
#5

PHP код:
public OnPlayerUpdate(playerid)
{
    new 
Float:hp;
    
GetPlayerHealth(playerid,hp);
    if(
hp <= 1.0) return SetPlayerHealth(playerid,-1.0); // you check if the player has less than 1 hp, you set it to -1, then in the next OnPlayerUpdate(in about 33 milliseconds) it'll check for the same and do the same, it'll repeat until the player respawns
    
if(Map[AllowWater] == 0)
    {
        if(
IsPlayerInWater(playerid))
        {
            
UpdateKST();
            
pInfo[playerid][mostkills] = 0;
            
pInfo[playerid][Killstreak] = 0;
            
EnemyTeamSetup(playerid);
            
SpawnPlayer(playerid);
            
CurePlayer(playerid);
        }
    }
    return 
1;

Also, can I ask you why are you posting with 3 different accounts?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)