PlayAudioStreamForPlayer Menu help
#1

Ok, so my problem is im trying to make a menu where you select a music genre, and after selecting the genre, another menu pops up with the music for that genre. well ive got it where itll show the genre menu, and you can select your genre and itll come to another menu for the selected genre, but the music wont play when you select it. any help is appreciated.
Reply
#2

wait a sec while I use my mind to see your code.
Reply
#3

Paste your code.... Use [pawn ] [ /pawn] Tags
Reply
#4

>.> srry i was in a rush.

pawn Код:
#define FILTERSCRIPT

#include <a_samp>
new Menu:radiomenu;
new Menu:HMmenu;
new Menu:ARmenu;
new Menu:Cmenu;
new Menu:Pmenu;
new Menu:RBmenu;
new Menu:DMmenu;
new Menu:CLmenu;
new Menu:Jmenu;


#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
radiomenu = CreateMenu("Select A Genre", 2, 200.0, 100.0, 150.0, 150.0);
HMmenu = CreateMenu("Heavy Metal", 2, 200.0, 100.0, 150.0, 150.0);
ARmenu = CreateMenu("Alternative Rock", 2, 200.0, 100.0, 150.0, 150.0);
Cmenu = CreateMenu("Country", 2, 200.0, 100.0, 150.0, 150.0);
Pmenu = CreateMenu("Pop", 2, 200.0, 100.0, 150.0, 150.0);
RBmenu = CreateMenu("R&B", 2, 200.0, 100.0, 150.0, 150.0);
DMmenu = CreateMenu("Death Metal", 2, 200.0, 100.0, 150.0, 150.0);
CLmenu = CreateMenu("Classic", 2, 200.0, 100.0, 150.0, 150.0);
Jmenu = CreateMenu("Jazz", 2, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(radiomenu, 0, "Heavy Metal");
AddMenuItem(radiomenu, 0, "Alternative Rock");
AddMenuItem(radiomenu, 0, "Country");
AddMenuItem(radiomenu, 0, "Pop");
AddMenuItem(radiomenu, 0, "R&B");
AddMenuItem(radiomenu, 0, "Death Metal");
AddMenuItem(radiomenu, 0, "Classical");
AddMenuItem(radiomenu, 0, "Jazz");
AddMenuItem(HMmenu, 0, "Mr. Crowley");
AddMenuItem(HMmenu, 1, "Ozzy Osbourne");
AddMenuItem(ARmenu, 0, "Viva La Gloria");
AddMenuItem(ARmenu, 1, "Green Day");

print("\n--------------------------------------");
print(" Radio Menu Filterscript by [DH]StarFox Loaded like a baws!");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#endif


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/radio", true) == 0)
{
    ShowMenuForPlayer(radiomenu,playerid);
    return 1;
}
    return 0;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    new Menu:CurrentMenu = GetPlayerMenu(playerid);
    if (CurrentMenu == radiomenu)
{
    switch(row)
    {
    case 0: //Heavy Metal
    {
    ShowMenuForPlayer(HMmenu,playerid);
    }
    case 1: //Alternative Rock
    {
    ShowMenuForPlayer(ARmenu,playerid);
    }
    case 2: //Country
    {
    ShowMenuForPlayer(Cmenu,playerid);
    }
    case 3: //Pop
    {
    ShowMenuForPlayer(Pmenu,playerid);
    }
    case 4: //R&B
    {
    ShowMenuForPlayer(RBmenu,playerid);
    }
    case 5: //Death Metal
    {
    ShowMenuForPlayer(DMmenu,playerid);
    }
    case 6: //Classical
    {
    ShowMenuForPlayer(CLmenu,playerid);
    }
    case 7: //Jazz
    {
    ShowMenuForPlayer(Jmenu,playerid);
    }
    }
    if (CurrentMenu == HMmenu)
    {
        switch(row)
        {
        case 0: //Ozzy Osbourne - Mr. Crowley
        {
        PlayAudioStreamForPlayer(playerid, "http://www.palaceofwisdom.net/MUSIC/Ozzy%20Osbourne%20-%20Mr.%20Crowley.mp3");
        }
        }
        if (CurrentMenu == ARmenu)
        {
        switch(row)
        {
        case 0: //Green Day - Viva La Gloria
        {
        PlayAudioStreamForPlayer(playerid, "http://foldedspace.org/files/Greenday%20-%20When%20I%20Come%20Around.mp3");
        }
    }
    }
}   }
    return 1;
}
Reply
#5

nvm, I figured this out a long time ago lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)