Anti Vehicle-Repair.
#8

Example

pawn Код:
new Float:vHealth[MAX_VEHICLES];
new OneSecond[MAX_PLAYERS];
OnPlayerUpdate

pawn Код:
static timee, ID;

timee = gettime();

if(OneSecond[playerid] < timee)
{
    OneSecond[playerid] = timee;
    ID = GetPlayerVehicleID(playerid);
    if(ID)
    {
        static Float:vHP;
        GetVehicleHealth(ID, vHP);
        if(vHP != vHealth[ID])
        {
            vHealth[ID] = vHP;
            // health changes
        }
    }
}
Reply


Messages In This Thread
Anti Vehicle-Repair. - by AfikAtashga - 25.09.2014, 08:28
Re: Anti Vehicle-Repair. - by AfikAtashga - 25.09.2014, 22:17
Re: Anti Vehicle-Repair. - by Jefff - 25.09.2014, 22:39
Re: Anti Vehicle-Repair. - by AfikAtashga - 25.09.2014, 22:41
Re: Anti Vehicle-Repair. - by Hanger - 25.09.2014, 22:48
Re: Anti Vehicle-Repair. - by Jefff - 25.09.2014, 22:49
Re: Anti Vehicle-Repair. - by AfikAtashga - 25.09.2014, 22:51
Re: Anti Vehicle-Repair. - by Jefff - 25.09.2014, 22:58
Re: Anti Vehicle-Repair. - by Jimmy0wns - 25.09.2014, 23:05
Re: Anti Vehicle-Repair. - by AfikAtashga - 25.09.2014, 23:19

Forum Jump:


Users browsing this thread: 3 Guest(s)