Posts: 1,733
Threads: 187
Joined: Oct 2014
Reputation:
0
Hey,
Is there any tutorial how to make radio system with url input so i can put every song i want ?
I knew how to do it before till i left learning to script n shit ):
Posts: 539
Threads: 30
Joined: Feb 2015
Reputation:
0
I think, no tutorial is there to show how to make one. Just ****** searched.
Posts: 1,733
Threads: 187
Joined: Oct 2014
Reputation:
0
I need a tutorial, So i'll know how to make it lol
Posts: 78
Threads: 15
Joined: Aug 2015
Reputation:
0
dcmd_radio(playerid,params[])
{
#pragma unused params
if(GetPVarInt(playerid, "health22") == 1)return SendClientMessage(playerid,-1,"{FF0000}[NGP]: you cannot use cmds while you in a fight or lossing health!");
if(AccInfo[playerid][Jailed] == 1)return SendClientMessage(playerid,red,"[NGP]: You cannot use this command in jail!");
ShowPlayerDialog(playerid,DIALOGID+192,DIALOG_STYL E_LIST,"Pick your Channel/Song","Miley Cyrus - adore you\nInna Crazy Sexy Wild\nEminem - Rap God\nMonster Eminem ft Rihanna\nMiley Cyrus - Wrecking Balls\nHit104 FM\nRadio 538(Dutch Radio Channel)\nNgp Radio\nWildstyles Ft. Niels Geusebroek - Year of Summer\nJumi Ki Raat-Kick\nBhardo Jholi Mere Ya muhammed-bajrangi bhaijaan\nStop Radio", "Select", "Close");
return 1;
}
if (dialogid == 123 && response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid,Stunt,DIALOG_STYLE_LIST, "{ff4500}Stunt And Maps" ,"{FB0404}BaseJump 1\n{0080FF}Basejump 2\n{00FF40}Pipes\n{FF8000}Drift City\n{FFFF80}Abondonent Stunt\n{0000FF}Jump 3", "SELECT", "EXIT");
}
case 1:
{
ShowPlayerDialog(playerid,Sanandreas,DIALOG_STYLE_ LIST,"{ff4500}Sanandreas" ,"{ffff00}/LV\n{ffff00}/LS\n{ffff00}/SF\n{ffff00}/LC", "SELECT", "EXIT");
}
case 2:
{
ShowPlayerDialog(playerid,Interiors,DIALOG_STYLE_L IST,"{ff4500}Interiors" ,"{FF8000}Michelle\n{ffff00}Katie\n{FF0000}Barbara \n{00FFFF}Helena\n{408080}Millie\n{0080C0}8-Track Stadium\n{00FF00}DirtBike Stadium\n{0000FF}Vice Stadium\n{008040}Madd Dogg,s Mansion", "SELECT", "EXIT");
}
case 3:
{
ShowPlayerDialog(playerid,Freeroam,DIALOG_STYLE_LI ST,"{ff4500}Freeroam" ,"{008040}/Lstune\n{0000FF}/Sftune\n{FF0000}Trucking\n{FF8040}Grove Street\n{0080C0}Vinewood\n{008000}Ls Downtown", "SELECT", "EXIT");
}
}
}
Posts: 1,266
Threads: 6
Joined: Oct 2014
lol :lllll leme teach you
![Cheesy](images/smilies/biggrin.png)
1. make the define and command for show dialog **** if you want it dialog
![Tongue](images/smilies/razz.gif)
****
Код:
#define DIALOG_RADIO 3000
now the command:
PHP код:
CMD:radio(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_LIST, "Welcome to Radio", "Song 1 Name\nSong 2 Name\nSong 3 name\nSong 4 Name\nSong 5 Name\nSong 6 Name\n{FF0000}Stop Radio", "Select", "Cancel");
return 1;
}
now we make the response D:
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_RADIO)
{
if(response)
{
if(listitem == 0)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 1)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 2)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 3)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 4)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 5)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 6)
{
PlayAudioStreamForPlayer(playerid,"Radio Stoped");
}
return 1;
}
}
return 0;
}
Posts: 78
Threads: 15
Joined: Aug 2015
Reputation:
0
ops i forgot to ad #define DIALOG_RADIO 3000 any way both are works
Posts: 158
Threads: 14
Joined: Dec 2014
Reputation:
0
there is tutorial: forum.sa-mp.com/showthread.php?t=301986
Posts: 1,733
Threads: 187
Joined: Oct 2014
Reputation:
0
first of all, i need a tutorial
second, i want a dialog, and u put the link of the song YOU want