[Ajuda] Respawn Carros
#1

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;
}
Reply


Messages In This Thread
Respawn Carros - by lHesoyaml - 19.01.2014, 20:16
Re: Respawn Carros - by Kmatsu - 19.01.2014, 20:19
Re: Respawn Carros - by JonathanFeitosa - 19.01.2014, 20:19
Re: Respawn Carros - by lHesoyaml - 19.01.2014, 20:22
Re: Respawn Carros - by rjjj - 19.01.2014, 21:29
Re: Respawn Carros - by lHesoyaml - 19.01.2014, 21:39

Forum Jump:


Users browsing this thread: 1 Guest(s)