Apply animation wont work
#1

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
    {
    switch(dialogid)
        {
        case 1457:
            {
            switch(listitem)
            {
                case 0:
                {
                    SendClientMessage(playerid, 0xFFFFFF, "Now playing animation plant bomb. (/stopanim to stop it)");
                    ApplyAnimation (playerid, "BOMBER", "BOM_Plant", 1, 1, 0, 0, 0, 0, 0);
This is not the full script but whenever i select case 0 the dialog just closes and doesnt do anything
Reply
#2

Check your dialog ID, Because that happens when an ID Is like another one.
Reply
#3

Dialog id is correct
Reply
#4

Wait, does that happen with other cases?
Reply
#5

pawn Код:
ApplyAnimation (playerid, "BOMBER", "BOM_Plant", 1, 0, 0, 0, 0, 1, 1);
https://sampwiki.blast.hk/wiki/ApplyAnimation
Give it a try, I don't work with animations much, but give it a shot anyway.
Reply
#6

Quote:
Originally Posted by SilverKiller
Посмотреть сообщение
Wait, does that happen with other cases?
Yup, it does
Reply
#7

Full thing
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
    {
    switch(dialogid)
        {
        case 1457:
            {
            switch(listitem)
            {
                case 0:
                {
                    SendClientMessage(playerid, 0xFFFFFF, "Now playing animation plant bomb. (/stopanim to stop it)");
                    ApplyAnimation (playerid, "BOMBER", "BOM_Plant", 1, 1, 0, 0, 0, 0, 0);
                }
                case 1:
                {
                    SendClientMessage(playerid, 0xFFFFFF, "Now playing Changes. (/stopmusic to stop it)");
                    ApplyAnimation (playerid, "BOMBER", "BOM_Plant", 1, 0, 0, 0, 0, 5000, 0);
                }
                case 2:
                {
                    SendClientMessage(playerid, 0xFFFFFF, "Now playing California love. (/stopmusic to stop it)");
                    PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/112608840/2pac%20-%20Tupac%20-%20California%20Love%20%5BWith%20Lyrics%5D.mp3");
                }
                case 3:
                {
                    SendClientMessage(playerid, 0xFFFFFF, "Now playing Gangster paradise. (/stopmusic to stop it)");
                    PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/112608840/2_pac_and_coolio_gangsters_paradise_with_pics_mp3_34436.mp3");
                }
                case 4:
                {
                    SendClientMessage(playerid, 0xFFFFFF, "Now playing Life goes on. (/stopmusic to stop it)");
                    PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/112608840/life_goes_on_tupac_mp3_37517.mp3");
                }
                case 5:
                {
                    SendClientMessage(playerid, 0xFFFFFF, "Now playing Ghetto gospel. (/stopmusic to stop it)");
                    PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/112608840/2_pac_ghetto_gospel_mp3_37720.mp3");
                }
                case 6:
                {
                    SendClientMessage(playerid, 0xFFFFFF, "Now playing Smile. (/stopmusic to stop it)");
                    PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/112608840/2pac_smile_mp3_37852.mp3");
                }
            }
            }
    }
    }
return 1;
}
Reply
#8

Please guys, the ids are good
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)