07.07.2013, 19:53
pawn Код:
bool:IsVehicleEmpty(vehicleid)
{
for(new i=0; i != MAX_PLAYERS; i++)
if(IsPlayerConnected(i))
if(IsPlayerInVehicle(i,vehicleid))
return false;
return true;
}
RespawnUnusedVehicleByModel(modelid)
{
for(new vehicleid = 1; vehicleid != MAX_VEHICLES; vehicleid++)
if(GetVehicleModel(vehicleid) == modelid)
if(IsVehicleEmpty(vehicleid))
SetVehicleToRespawn(vehicleid):
}