2 little bugs in OnPlayerRequestClass
#1

Hey hello,

I have a little problem, the problem is in OnPlayerRequestClass. I've added music and anims in the OnPlayerRequestClass. But the anim is only showing by the first character. And not by the rest by the characters. And the music is repeating again and again when I look by another skins. But the music must be play during the time in OnPlayerRequestClass... And not repeating when I choose another skin.

This is it:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
    SetPlayerInterior(playerid,5);
    SetPlayerPos(playerid,762.6628,11.2875,1001.1639);
    SetPlayerFacingAngle(playerid, 270);
    SetPlayerCameraPos(playerid,767.6994,11.1984,1000.7057);
    SetPlayerCameraLookAt(playerid,762.6628,11.2875,1001.1639);
    switch (classid)
    {
        case 0:
        {
            for(new count;count <288;count++)
            {
            GameTextForPlayer(playerid,"~r~Welcome",800,6);
            }
            ApplyAnimation(playerid,"FIGHT_D","FightD_3",4.1,1,1,1,1,1,1);
        }
    }
    return 1;
}
Reply
#2

Look at your switch statement.
Reply
#3

My co-owner told me thats the switch statement good is, and nothing wrong with it is.. Hmm
Reply
#4

case 0 - when the class is 0, apply the animation. It's pretty obvious if you look at it LOGICALLY.
Reply
#5

Okay, but how can I make a fast way to set the classes 0 to 288 in the case? just likes:

Quote:

(new count;count <288;count++)

Reply
#6

What are you talking about? Just move the ApplyAnimation line outside of the switch statement.
Reply
#7

Its already fixed, I am sorry for my late reaction. My co-owner was confused and told me the fake-truth =P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)