/fixallvehicles or /repairallcars
#2

you'd have to loop trough all vehicles

pawn Код:
YCMD:repairall(playerid,params[],help)
{
    if(help) return SendClientMessage(playerid,-1,"/repairall is used to repair every single vehicle on the server.");
    //maybe do some admin-condition here
    for(new i=0; i<MAX_VEHICLES; i++)
        RepairVehicle(i);
       
    SendClientMessageToAll(-1,"All vehicles have been repaired by an admin!");
}
instead of MAX_VEHICLES
you could also use

pawn Код:
stock GetMaxVehicles()
{
    new iCount;
    for(new i = 1; i < MAX_VEHICLES; ++i)
        if(GetVehicleModel(i)) iCount++;

    return iCount;
}
Reply


Messages In This Thread
/fixallvehicles or /repairallcars - by TheLastShadow - 07.03.2014, 06:48
Re: /fixallvehicles or /repairallcars - by CutX - 07.03.2014, 06:52
Re: /fixallvehicles or /repairallcars - by TheLastShadow - 07.03.2014, 06:59
Re: /fixallvehicles or /repairallcars - by CrazyFrenzy - 07.03.2014, 07:43

Forum Jump:


Users browsing this thread: 1 Guest(s)