[Ajuda] Comando para respawnar veiculos
#3

Se For em Strcmp:
pawn Код:
if(strcmp(cmd, "/RespawnCars", true) == 0)
    {
        new string[528];
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, CINZA, "Somente Administrador");
        SendClientMessageToAll(0x00FF00FF, string);
        new bool:vehicle[MAX_VEHICLES];
        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);
    }
        return 1;
    }
Em ZCMD:
pawn Код:
CMD:respawncars(playerid)
    {
        new string[528];
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, CINZA, "Somente Administrador");
        SendClientMessageToAll(0x00FF00FF, string);
        new bool:vehicle[MAX_VEHICLES];
        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);
    }
        return 1;
    }
Reply


Messages In This Thread
Comando para respawnar veiculos - by N3XTMapper - 09.10.2013, 16:58
Re: Comando para respawnar veiculos - by Juniiro3 - 09.10.2013, 17:01
Re: Comando para respawnar veiculos - by TheKoDaK - 09.10.2013, 17:01
Re: Comando para respawnar veiculos - by N3XTMapper - 09.10.2013, 17:01
Re: Comando para respawnar veiculos - by N3XTMapper - 09.10.2013, 17:47
Re: Comando para respawnar veiculos - by Zivo - 09.10.2013, 19:32

Forum Jump:


Users browsing this thread: 4 Guest(s)