Random Animation
#7

Not nessacarily like that, you could do something like this:
pawn Код:
new RandomPlayer = INVALID_PLAYER_ID, TempIndex;
while(RandomPlayer == INVALID_PLAYER_ID)
{
    TempIndex = random(GetPlayerPoolSize() + 1);
    if(TempIndex != INVALID_PLAYER_ID)
        RandomPlayer = TempIndex;
}

ApplyAnimation(RandomPlayer, "WUZI", "CS_Dead_Guy", 4.1, 1, 0, 0, 0, 1, 1);
Alternatively, you could just do this with foreach if you want more optimization:
pawn Код:
ApplyAnimation(Iter_Random(Player), "WUZI", "CS_Dead_Guy", 4.1, 1, 0, 0, 0, 1, 1);
Reply


Messages In This Thread
Random Animation - by aoky - 08.02.2017, 13:05
Re: Random Animation - by Abagail - 08.02.2017, 13:19
Re: Random Animation - by aoky - 08.02.2017, 13:26
Re: Random Animation - by aoky - 08.02.2017, 13:55
Re: Random Animation - by Abagail - 08.02.2017, 16:12
Re: Random Animation - by aoky - 08.02.2017, 16:41
Re: Random Animation - by Abagail - 08.02.2017, 18:25
Re: Random Animation - by aoky - 08.02.2017, 18:31
Re: Random Animation - by Abagail - 08.02.2017, 18:32
Re: Random Animation - by aoky - 08.02.2017, 18:47

Forum Jump:


Users browsing this thread: 1 Guest(s)