19.01.2014, 20:16
Bom galera o meu comando de respawncarros (carros sem uso) funciona, mais ele respawna os trailers tambem.Como faзo para ele nгo respawnar os trailers em uso.Obg.
pawn Код:
COMMAND:respawncarros(playerid, params[])
{
SendAdminText(playerid, "/respawncarros", params);
if (APlayerData[playerid][PlayerLevel] < 3) return 0;
ResetarVeiculos();
new Msg[300], Name[24];
GetPlayerName(playerid, Name, sizeof(Name));
format(Msg, 300, "{00BFFF}O Adminstrador {FFFFFF}%s {00BFFF}resetou todos os veiculos desocupados.",Name);
SendClientMessageToAll(0xFF99AADD, Msg);
return true;
}
stock ResetarVeiculos()
{
new inVeh;
for( new i = 0; i < MAX_VEHICLES; i++ )
{
inVeh = false;
for( new j = 0; j < GetMaxPlayers(); j++ )
{
if(IsPlayerInVehicle( j, i ))
{
inVeh = true;
break;
}
}
if(!inVeh)
{
SetVehicleToRespawn(i);
}
}
return true;
}