07.03.2014, 06:48
I want a command to repair all cars on the server . Sorry for my english. Thank's.
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!");
}
stock GetMaxVehicles()
{
new iCount;
for(new i = 1; i < MAX_VEHICLES; ++i)
if(GetVehicleModel(i)) iCount++;
return iCount;
}
if (strcmp("/repairall", cmdtext, true, 9) == 0)
{
for(new i=0; i<MAX_VEHICLES; i++)
RepairVehicle(i);
SendClientMessageToAll(-1,"All vehicles have been repaired by an admin!");
return 1;
}