auto repair
#10

it looks like this now:
pawn Code:
//at the top
new autorepair[MAX_PLAYERS];
pawn Code:
forward AutoR(playerid);

public AutoR(playerid)
{
    new Float:VHealth, vehicleid = GetPlayerVehicleID(playerid);
    GetVehicleHealth(vehicleid,VHealth);
    if(autorepair[playerid] == 1)
    {
        if (IsPlayerInAnyVehicle(playerid))
        {
            if(VHealth < 999)
            {
            RepairVehicle(vehicleid);
            }
        }
    }
    return 1;
}
onplayercommand
pawn Code:
if (strcmp("/offroadmap", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, -2644, -2130, 1704+1);
        SendClientMessage(playerid, COLOR_ORANGE, "Thank Thanator for making the offroad road");
        autorepair[playerid] = 1;
        SetPlayerCheckpoint(playerid, 79.8441, -1531.5741, 2413.0000, 5);
        return 1;
    }
Reply


Messages In This Thread
auto repair - by Madsen - 30.03.2011, 13:07
Re: auto repair - by HyperZ - 30.03.2011, 13:13
Re: auto repair - by Ћilvėnas - 30.03.2011, 13:14
AW: Re: auto repair - by xerox8521 - 30.03.2011, 14:32
Re: auto repair - by Madsen - 30.03.2011, 15:13
Re: auto repair - by Zh3r0 - 30.03.2011, 15:17
Re: auto repair - by Madsen - 30.03.2011, 20:58
Re: auto repair - by Madsen - 31.03.2011, 07:28
Re: auto repair - by Madsen - 01.04.2011, 20:24
Re: auto repair - by Madsen - 01.04.2011, 21:32

Forum Jump:


Users browsing this thread: 1 Guest(s)