Moving everything one step back.
#1

Alright, it's really hard to explain what I want.. Lets say two players (Id 5, and id 8 ) hit me in 1 second difference.

pawn Код:
PlayersHit++;
PlayerIDBank[PlayersHit] = playerid;
So basically,
this stores ID 5 in PlayersIDBank[1] = 5;
and ID 8 into PlayersIDBank[2] = 8;.

Everything seems good. Now I want to vanish the first player who hit me after 5seconds (ID: 5), I set a timer whenever someone hits me and it looks like this:

pawn Код:
PlayersHit++;
PlayerIDBank[PlayersHit] = playerid;
SetTimerEx("RemovePlayerID",5000,false,...);
Everything seems great ( please ignore the possible bugs in future and etc.)

So now, this is the problem. I have no idea how to remove the player ID 5 from the slot [1], maybe storing the slot id into a variable and attaching it into player id 5? Might work, but what about the slot [2]? The thing is, after I remove the first slot, the slot 2 MUST overtake slot1 place and become Slot[2]to Slot[1] = 8. I just cant think of a way to do this more efficiently OR AT LEAST DOING IT. Any help is appreciated.

NOTE: I will use multiple player id's up to 5, so I want them to move back.
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: 4 Guest(s)