07.08.2011, 05:18
pawn Код:
stock ResetarCarros()
{
SendClientMessageToAll(COLOR_RED, "{FFFFFF}Chapolin Colorado informa{FFFF00}: Todos os veнculos foram respawnados!");
new bool:inVeh, bool:vipVeh, bool:carroadmVeh;
for( new i = 0; i < MAX_VEHICLES; ++i )
{
inVeh = false, vipVeh = false, carroadmVeh = false;
for( new j = 0; j < MAX_PLAYERS; j++ )
{
// DestroyVehicle(CarroVIP[j]);
// DestroyVehicle(carroadm[j]);
if(IsPlayerInVehicle( j, i ))
{
inVeh = true;
break;
}
if(IsPlayerInVehicle( j, carroVIP[i] ))
{
vipVeh = true;
break;
}
if(IsPlayerInVehicle( j, carroadmVeh[i]))
{
carroadmVeh = true;
break;
}
}
if(!inVeh) SetVehicleToRespawn(i);
if(!carroadmVeh) SetVehicleToRespawn(carroadm[i]);
if(!vipVeh) SetVehicleToRespawn(carroVIP[i]);
}
}