17.06.2011, 09:39
i need cmd for respawn all unused car please give me
thanks
thanks
CMD:respawn(playerid, params[])
{
for(new i; i < MAX_VEHICLES; i++)
{
RespawnVehicle(i);//Not sure if its a function...
}
return 1;
}
CMD:respawncars(playerid, params[])
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(IsVehTaken(i) == 0)
{
SetVehicleToRespawn(i)
}
}
}
stock IsVehTaken(vid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(vid == GetPlayerVehicleID(i))
{
return 1;
}
}
return 0;
}