07.03.2014, 06:52
you'd have to loop trough all vehicles
instead of MAX_VEHICLES
you could also use
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!");
}
you could also use
pawn Код:
stock GetMaxVehicles()
{
new iCount;
for(new i = 1; i < MAX_VEHICLES; ++i)
if(GetVehicleModel(i)) iCount++;
return iCount;
}