PLayer ID Undefined under this callback? Any alternatives?
#1

For my HealthCheck,

Код:
forward HealthCheck();
public HealthCheck()
{
    for(new i=0; i<MAX_PLAYERS; i++){
        if(IsPlayerConnected(i)){
            new Float:Health;
            GetPlayerHealth(i, Health);
            if(Health < 10){
                SetPlayerSkin(playerid,137);
            }
        }
    }
}
I get the Playerid is underfined. Is there a way around this? the plan is, Checks if players health is 10 or below, and if so, it will change the skin.
Reply
#2

pawn Код:
SetPlayerSkin(i,137);
Reply
#3

pawn Код:
forward HealthCheck(playerid);

public HealthCheck(playerid)
{
    new Float:Health;
    GetPlayerHealth(playerid,Health);
    if(Health < 10) SetPlayerSkin(playerid,137);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)