24.10.2014, 16:40
Can anyone make me a command /rac to respawn all unused vehicles...
This is the system i have now:
This system respawn all vehicles that are not used, but now i want something else.
I want if the vehicleid == pInfo[MAX_PLAYERS][AdminCar] - to destroy that vehicle and respawn all the others...
Now i hope that someone understands me...
This is the system i have now:
Код:
YCMD:rac(playerid, params[],help)
{
new bool:vehicleused[MAX_VEHICLES];
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
vehicleused[GetPlayerVehicleID(i)] = true;
}
}
for(new i=1; i < MAX_VEHICLES; i++)
{
if(!vehicleused[i])
{
SetVehicleToRespawn(i);
}
}
}
I want if the vehicleid == pInfo[MAX_PLAYERS][AdminCar] - to destroy that vehicle and respawn all the others...
Now i hope that someone understands me...


