Some Questions
#2

Yes but it doesn't make sense, it should be

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(God[playerid] == 1) // god mode enabled
    {
        new Float:health;
        GetPlayerHealth(playerid,health);
        if(health < 999.0) SetPlayerHealth(playerid, 1000.0);

        GetPlayerArmour(playerid,health);
        if(health < 999.0) SetPlayerArmour(playerid, 1000.0);

        new veh = GetPlayerVehicleID(playerid);
        if(veh > 0)
        {
            GetVehicleHealth(veh, health);
            if(health < 999.0)
            {
                SetVehicleHealth(veh, 1000.0); // you don't need this line
                RepairVehicle(veh);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Some Questions - by donhu789 - 31.08.2016, 23:59
Re: Some Questions - by Jefff - 01.09.2016, 00:41
Re: Some Questions - by donhu789 - 01.09.2016, 00:45

Forum Jump:


Users browsing this thread: 1 Guest(s)