Random Animation OnPlayerRequestClass
#1

By looking at a thread, I managed to create a code, consisting of an array, that stores the animation data, ex: "DANCING" and "dnce_M_b".

Then I added a random function that picks a random position of the array.

Finally I added this code under OnPlayerRequestClass and everything compiled properly.


The problem is that when I get to the skin selection screen, no animations will play and I can't quite figure out why.

Can you advise me on what I should do?

Код:
new RandomAnims[][] =
{
    {"DANCING", "dnce_M_b"}, // RandomAnime
    {"PAULNMAC", "wank_in"}, // RandomAnime
    {"KISSING", "Grlfrd_Kiss_01"}, // RandomAnime
    {"FIGHT_E", "FightKick"}, // RandomAnime
    {"FIGHT_B", "FightB_1"} // RandomAnime
};

public OnPlayerRequestClass(playerid, classid)
{

    new Random = random(sizeof(RandomAnims));
    ApplyAnimation(playerid, RandomAnims[Random][0], RandomAnims[Random][1], 4.0, 1, 1, 1, 0, -1);
Reply


Messages In This Thread
Random Animation OnPlayerRequestClass - by borg747 - 01.08.2012, 15:44
Re: Random Animation OnPlayerRequestClass - by iggy1 - 01.08.2012, 15:47
Re: Random Animation OnPlayerRequestClass - by borg747 - 01.08.2012, 16:16
Re: Random Animation OnPlayerRequestClass - by iggy1 - 01.08.2012, 16:23
Re: Random Animation OnPlayerRequestClass - by borg747 - 01.08.2012, 16:28
Re: Random Animation OnPlayerRequestClass - by Roko_foko - 01.08.2012, 16:46
Re: Random Animation OnPlayerRequestClass - by borg747 - 01.08.2012, 16:57
Re: Random Animation OnPlayerRequestClass - by Roko_foko - 01.08.2012, 17:04
Re: Random Animation OnPlayerRequestClass - by borg747 - 01.08.2012, 17:08
Re: Random Animation OnPlayerRequestClass - by Roko_foko - 01.08.2012, 17:15

Forum Jump:


Users browsing this thread: 2 Guest(s)