Ayuda Repair vehicle
#3

pawn Код:
SetTimer("checkVehicleHealth", 1000, 1); //va OnGameModeInit o OnFilterScriptInit

forward checkVehicleHealth();
public checkVehicleHealth()
{
    static iPlayer, iVehicleID, Float:fVehicleHealth;
    iPlayer = 0;
    #if defined _FOREACH_LOCAL_VERSION
    foreach(iPlayer:Player)
    #else
    for(;iPlayer<MAX_PLAYERS;iPlayer++) if(IsPlayerConnected(iPlayer))
    #endif
    {
        iVehicleID = GetPlayerVehicleID(iPlayer);
        GetVehicleHealth(iVehicleID, fVehicleHealth);
        if(fVehicleHealth < 250.0)
        {
            RepairVehicle(iVehicleID);
        }
    }
}
Reply


Messages In This Thread
Ayuda Repair vehicle - by leon44 - 17.01.2014, 05:28
Respuesta: Ayuda Repair vehicle - by Swedky - 17.01.2014, 05:31
Respuesta: Ayuda Repair vehicle - by MugiwaraNoLuffy - 17.01.2014, 05:40
Respuesta: Ayuda Repair vehicle - by leon44 - 17.01.2014, 13:08

Forum Jump:


Users browsing this thread: 1 Guest(s)