01.08.2012, 15:44
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?
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);