Moving everything one step back.
#4

I can, but I don't like using IF(... a million times and setting something, i've came up with this code:

the idSlot[playerid] is the banked slot of his id
pawn Код:
for(new i=PlayersHit; i--;)
{
    if(PlayerIDBank[i] == -1)
    {
        ForEach(a,MAX_PLAYERS);
        if(i < idSlot[a])
        {
            PlayerIDBank[idSlot[a]] = -1;
            PlayerIDBank[i] = a;
            idSlot[a] = i;
        }
    }
}
Could this work?

EDIT: Should I add PlayersHit--; into the loop where changing is happening/
Reply


Messages In This Thread
Moving everything one step back. - by EV007 - 22.10.2012, 15:44
Re: Moving everything one step back. - by [HK]Ryder[AN] - 22.10.2012, 15:48
Re: Moving everything one step back. - by EV007 - 22.10.2012, 16:09
Re: Moving everything one step back. - by EV007 - 22.10.2012, 16:16
Re: Moving everything one step back. - by EV007 - 25.10.2012, 16:55
Re: Moving everything one step back. - by Finn - 25.10.2012, 17:31
Re: Moving everything one step back. - by EV007 - 25.10.2012, 18:42

Forum Jump:


Users browsing this thread: 3 Guest(s)