Help me vehicle system, command fix and repair
#2

Do you want an Auto Repair script?
pawn Код:
//on top of your script
forward FixAllCars();
new FixTimer;

// OnGameModeInit
FixTimer = SetTimer("FixAllCars", 1000, true);

//OnGameModeExit
KillTimer(FixTimer);

//------------------
public FixAllCars()
{
        for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
        // loop all possible player
        {
                if(IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid))
                //if the player is connected AND in a car
                {
                        new vehicleid = GetPlayerVehicleID(playerid);// gettin the vehicle id
                        SetVehicleHealth(vehicleid,1000.0);// set the vehicle health
                }
        }
}
Reply


Messages In This Thread
Help me vehicle system, command fix and repair - by SFRPVN - 07.03.2014, 10:58
Re: Help me vehicle system, command fix and repair - by SyntaxQ - 07.03.2014, 11:34
Re: Help me vehicle system, command fix and repair - by SFRPVN - 07.03.2014, 11:43
Re: Help me vehicle system, command fix and repair - by SyntaxQ - 07.03.2014, 12:23

Forum Jump:


Users browsing this thread: 1 Guest(s)