2 Problems with clickable textdraws (+ 7 REP)
#3

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Each TextdDraw of style of music has different ID?
yes
,

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid != INVALID_TEXT_DRAW)
    {
        if(clickedid == techno)
        {
            PlayAudioStreamForPlayer(playerid, "http://listen.technobase.fm/dsl.pls");
        }
        else if(clickedid == hard)
        {
            PlayAudioStreamForPlayer(playerid, "http://listen.hardbase.fm/dsl.pls");
        }
        else if(clickedid == house)
        {
            PlayAudioStreamForPlayer(playerid, "http://listen.housetime.fm/dsl.pls");
        }
        else if(clickedid == dubstep)
        {
            PlayAudioStreamForPlayer(playerid, "http://dubstep.fm/listen.pls");
        }
        else if(clickedid == trance)
        {
            PlayAudioStreamForPlayer(playerid, "http://listen.trancebase.fm/dsl.pls");
        }
        else if(clickedid == stop)
        {
            StopAudioStreamForPlayer(playerid);
        }
        TextDrawHideForPlayer(playerid, radiobox0);
        TextDrawHideForPlayer(playerid, radiobox1);
        TextDrawHideForPlayer(playerid, radiobox2);
        TextDrawHideForPlayer(playerid, radiobox3);
        TextDrawHideForPlayer(playerid, radiobox4);
        TextDrawHideForPlayer(playerid, techno);
        TextDrawHideForPlayer(playerid, hard);
        TextDrawHideForPlayer(playerid, house);
        TextDrawHideForPlayer(playerid, dubstep);
        TextDrawHideForPlayer(playerid, trance);
        TextDrawHideForPlayer(playerid, stop);
        CancelSelectTextDraw(playerid);
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)