Respawn all unused vehicles?
#2

Hey! You should use a 'Nested Loop'. Let me know if this works.

pawn Код:
COMMAND:opetvozila(playerid,params[])
{
    SendAdminText(playerid, "/opetvozila", params);
    if (APlayerData[playerid][LoggedIn] == true && APlayerData[playerid][PlayerLevel] > 9)
    {
        for(new i; i < MAX_VEHICLES; i++)
        {
            for(new x; x < MAX_PLAYERS; x++)
            {
                if(!IsPlayerInVehicle(x, i))
        {
            SetVehicleToRespawn(i);
        }
        }
        }
        SendClientMessageToAll(0xFFFFFF, "Vozila su opet ucitana. Mozete ih naci na mjestu gdje su parkirani.");
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
Respawn all unused vehicles? - by NexySamp - 08.08.2015, 21:07
Re: Respawn all unused vehicles? - by Dokins - 08.08.2015, 21:25
Re: Respawn all unused vehicles? - by NexySamp - 08.08.2015, 21:34
Re: Respawn all unused vehicles? - by Dokins - 08.08.2015, 22:13
Re: Respawn all unused vehicles? - by Dokins - 08.08.2015, 22:15
Re: Respawn all unused vehicles? - by NexySamp - 08.08.2015, 22:22
Re: Respawn all unused vehicles? - by Dokins - 08.08.2015, 22:24
Re: Respawn all unused vehicles? - by MarvinPWN - 09.08.2015, 08:38
Re: Respawn all unused vehicles? - by IceBilizard - 09.08.2015, 08:49
Re: Respawn all unused vehicles? - by NexySamp - 09.08.2015, 12:09

Forum Jump:


Users browsing this thread: 3 Guest(s)