/vrespawn help
#4

Ofcourse not, you didn't make a loop, you made it check for the player who types /vrespawn only.

Try this:
pawn Код:
CMD:vrespawn(playerid, params[])
{
    new Unusedcar[MAX_VEHICLES];
    if(PlayerData[playerid][AdminLevel] > 1)  
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(IsPlayerInAnyVehicle(i))
                {
                    Unused[GetPlayerVehicleID(i)]=1; // 1 = false, which means it's used
                }
            }
        }
        for(new carid = 0; carid < MAX_VEHICLES; carid++)
        {
            if(unused[carid]==0) // 0 = true which means it's unused.
            {
                SetVehicleToRespawn(carid);
            }
        }
    }
return 1;
}
Reply


Messages In This Thread
/vrespawn help - by tanush - 20.03.2011, 17:56
Re: /vrespawn help - by iJumbo - 20.03.2011, 18:04
Re: /vrespawn help - by tanush - 20.03.2011, 18:27
Re: /vrespawn help - by Biesmen - 20.03.2011, 19:08
Re: /vrespawn help - by Davz*|*Criss - 20.03.2011, 20:18
Re: /vrespawn help - by [ProX]BlueFire - 20.03.2011, 20:20
Re: /vrespawn help - by tanush - 20.03.2011, 20:20

Forum Jump:


Users browsing this thread: 1 Guest(s)