*Daim*
Умник
В public OnPlayerCommandText:
В public OnPlayerDialogResponse:
Полезная команда Автор: Maxim
Если интересно "+"
Если повторилось извиняюсь
PHP:
if(strcmp(cmd, "/music", true) == 0)
{
new string[256];
new sctring[2000];
format(string, sizeof(string), "{ff0000}Выключить\n{00ffff}Radio Record\n{00ffff}Trancemission Radio\n{00ffff}Pirate Station\n{00ffff}Vip Mix\n{00ffff}Teodor Hardstyle\n{00ffff}Radio Record Dancecore\n{00ffff}Radio Record Breaks\n{00ffff}Radio Record Chill-Out\n{00ffff}Radio Record Dupstep\n");
strcat(sctring, string);
format(string, sizeof(string), "{00ffff}Супердискотека 90-x\n{00ffff}Radio Record Club\n{00ffff}Медляк FM\n{00ffff}Гоп FM");
strcat(sctring, string);
new title[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(title, sizeof(title), "{ffdb58}Плеер: {ffffff}%s", name);
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, title, sctring, "Выбрать", "Выйти");
SetPlayerAttachedObject(playerid, 1, 19421, 2, 0.030000, -0.017000, -0.004000, -90.199958, 6.199999, -95.299995, 0.996999, 1.003000, 0.862999);
return true;
}
PHP:
if(dialogid == 100)
{
if(response)
{
if(listitem == 0)
{
StopAudioStreamForPlayer(playerid);
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
}
}
if(listitem == 1)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8101/rr_128");
}
if(listitem == 2)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/tm_128");
}
if(listitem == 3)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/ps_128");
}
if(listitem == 4)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/vip_128");
}
if(listitem == 5)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/teo_128");
}
if(listitem == 6)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/dc_128");
}
if(listitem == 7)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/brks_128");
}
if(listitem == 8)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/chil_128");
}
if(listitem == 9)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/dub_128");
}
if(listitem == 10)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/sd90_128");
}
if(listitem == 11)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/club_128");
}
if(listitem == 12)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/mdl_128");
}
if(listitem == 13)
{
PlayAudioStreamForPlayer(playerid, "http://online.radiorecord.ru:8102/gop_128");
}
}
}
Если интересно "+"
Если повторилось извиняюсь
