05.11.2012, 13:48
Define your dialog.
If that doesnt work your dialog may be conflicting with another, try this
EDIT: I have just noticed, the links are not valid! For example..
they need to end in .pls or .mp3
If that doesnt work your dialog may be conflicting with another, try this
PHP код:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#define radiodialog 1254
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
}
#endif
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == radiodialog)
{
if(listitem == 0)//Radio 1
{
PlayAudioStreamForPlayer(playerid,"http://player.power.ee/");
}
if(listitem == 1)//Radio 2
{
PlayAudioStreamForPlayer(playerid,"http://player.stream.akaver.com/player/skyplus_flash.php");
}
if(listitem == 2)//Radio 3
{
PlayAudioStreamForPlayer(playerid,"http://vahva.ee/stream/player.html");
}
if(listitem == 3)//Radio 4
{
PlayAudioStreamForPlayer(playerid,"http://player.spinfm.ee/");
}
if(listitem == 4)//Radio 5
{
PlayAudioStreamForPlayer(playerid,"http://player.starfm.ee/");
}
if(listitem == 5)//Radio 6
{
PlayAudioStreamForPlayer(playerid,"http://stream.akaver.com/player/energyfm_html5.php");
}
if(listitem == 6)//Radio 7
{
PlayAudioStreamForPlayer(playerid,"http://feeljahfm.com/");
}
if(listitem == 7)
{
StopAudioStreamForPlayer(playerid);
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
CMD:raadio(playerid,params[])
{
ShowPlayerDialog(playerid,radiodialog,DIALOG_STYLE_LIST,"Raadio","Power Hit Radio\nSkyplus FM\nTre Radio\nSpin FM\nStar FM\nEnergy FM\nReggae FM\nPeata raadio","Vali","");
return 1;
}
they need to end in .pls or .mp3