[AJUDA] Destruir certos veнculos
#7

Quote:
Originally Posted by [O.z]Caroline
Посмотреть сообщение
pawn Код:
if(strcmp(cmdtext, "/rc", true) == 0)
    {
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000, "[ERRO] VocК nгo estб logado na RCON.");
        new str[40], nome[24], bool:vehicle[MAX_VEHICLES];
        GetPlayerName(playerid, nome, 24);
        format(str, 40, "O Admin %s Respawnou os veiculos", nome);
        SendClientMessageToAll(-1, str);
        for(new j = 1; GetVehicleModel(j); ++j)
        {
            vehicle[j] = false;
            for(new i, p = GetMaxPlayers(); i < p; ++i)
            {
                if(!IsPlayerInAnyVehicle(i) || !IsPlayerConnected(i)) continue;
                if(IsPlayerInVehicle(i, j))
                {
                    vehicle[j] = true;
                    break;
                }
            }
            if(!vehicle[j]) SetVehicleToRespawn(j);
        }
        for(new i; i != sizeof(Carro); ++i)
        {
            DestroyVehicle(Carro[i]);
            printf("Veiculo destruido ( Carro[%i] )", i);
        }
        return 1;
    }
nгo usamos return dentro de um loop correto ?

@topic

no meu cуdigo sу serгo destruнdos os carros que nгo estiverem em uso.. tente testa-lo
Reply


Messages In This Thread
[AJUDA] Destruir certos veнculos - by AW4Y - 22.12.2011, 15:22
Re: [AJUDA] Destruir certos veнculos - by [O.z]Caroline - 22.12.2011, 15:26
Re: [AJUDA] Destruir certos veнculos - by AW4Y - 22.12.2011, 15:30
Re: [AJUDA] Destruir certos veнculos - by Cristhian - 22.12.2011, 15:34
Re: [AJUDA] Destruir certos veнculos - by [O.z]Caroline - 22.12.2011, 15:35
Re: [AJUDA] Destruir certos veнculos - by AW4Y - 22.12.2011, 15:42
Re: [AJUDA] Destruir certos veнculos - by Cristhian - 22.12.2011, 15:45
Re: [AJUDA] Destruir certos veнculos - by [O.z]Caroline - 22.12.2011, 15:49
Re: [AJUDA] Destruir certos veнculos - by AW4Y - 22.12.2011, 15:52
Re: [AJUDA] Destruir certos veнculos - by Cristhian - 22.12.2011, 15:53

Forum Jump:


Users browsing this thread: 1 Guest(s)