how do i make a fix cmd??
#3

Maybe you will prefer an auto fix system?

:
Top of the script:
pawn Код:
forward AutoFix();
Ongamemodeinit
pawn Код:
SetTimer("AutoFix", 1000, 1);
pawn Код:
public AutoFix() {
    for(new playerid=0; playerid<MAX_PLAYERS; playerid++) {
        if(IsPlayerConnected(playerid)) {
            new Float:health, cid;
            if (IsPlayerInAnyVehicle(playerid)) {
                cid = GetPlayerVehicleID(playerid);
                GetVehicleHealth(cid, health);
                if (health < 950) {
                    RepairVehicle(GetPlayerVehicleID(playerid));

                }
            }
        }
    }
    return 1;
}
Thats it! you have a working auto fix system
Reply


Messages In This Thread
how do i make a fix cmd?? - by [EDT]AmanSingh123 - 26.02.2011, 11:10
Re: how do i make a fix cmd?? - by maramizo - 26.02.2011, 11:14
Re: how do i make a fix cmd?? - by lewismichaelbbc - 26.02.2011, 11:18
Re: how do i make a fix cmd?? - by maramizo - 26.02.2011, 11:28
Re: how do i make a fix cmd?? - by Edski - 26.02.2011, 11:34

Forum Jump:


Users browsing this thread: 4 Guest(s)