How would I go about making a toggle for unlimited car health
#2

pawn Код:
new bool:CarGodMode[MAX_PLAYERS];

CMD:cargod(playerid)
{
   if(CarGodMode[playerid]) CarGodMode[playerid] = false;
   else CarGodMode[playerid] = true;
   return 1;
}
public OnPlayerUpdate(playerid)
{
    if(CarGodMode[playerid])
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
             RepairVehicle(GetPlayerVehicleID(playerid));
        }
    }
    return 1;
}
*Note: "OnPlayerUpdate" is called many times in a second....
Reply


Messages In This Thread
How would I go about making a toggle for unlimited car health - by ExtendedCarbon - 08.09.2013, 11:14
Re: How would I go about making a toggle for unlimited car health - by dusk - 08.09.2013, 11:21
Re: How would I go about making a toggle for unlimited car health - by Konstantinos - 08.09.2013, 11:22
Re: How would I go about making a toggle for unlimited car health - by Jstylezzz - 08.09.2013, 11:24
Re: How would I go about making a toggle for unlimited car health - by Weponz - 08.09.2013, 11:24

Forum Jump:


Users browsing this thread: 1 Guest(s)