- Регистрация
- 27 Авг 2015
- Сообщения
- 357
- Лучшие ответы
- 0
- Репутация
- 188
PHP:
#define COLOR_1 0x11305CFF //Задний фон | светло-синий
#define COLOR_2 0x0B1F3BFF //Передний фон | темно-синий
new Text:RADIO_TD[9];
new PlayerText:RADIONAME[MAX_PLAYERS];
static RadioNames[5][] = {{"Выключено"},{"ZaycevFM"},{"SkyRadio"},{"Soma FM"},{"Radio Record"}};
static RadioURL[5][] = {
{""},
{"http://www.zaycev.fm:9001/rnb/ZaycevFM(128)"},
{"http://stream05.akaver.com/skyradio_hi.mp3"},
{"http://somafm.com/tags.pls"},
{"http://air.radiorecord.ru:8102/club_128"}
};
new ChooseRadio[MAX_PLAYERS];//Выбранное радио
PHP:
RADIONAME[playerid] = CreatePlayerTextDraw(playerid, 324.000000, 357.125000, "EUROPA PLUS");
PlayerTextDrawLetterSize(playerid, RADIONAME[playerid], 0.150499, 0.821250);
PlayerTextDrawTextSize(playerid, RADIONAME[playerid], 0.000000, 67.000000);
PlayerTextDrawAlignment(playerid, RADIONAME[playerid], 2);
PlayerTextDrawColor(playerid, RADIONAME[playerid], -1);
PlayerTextDrawUseBox(playerid, RADIONAME[playerid], 1);
PlayerTextDrawBoxColor(playerid, RADIONAME[playerid], COLOR_2);
PlayerTextDrawSetShadow(playerid, RADIONAME[playerid], 0);
PlayerTextDrawSetOutline(playerid, RADIONAME[playerid], 0);
PlayerTextDrawBackgroundColor(playerid, RADIONAME[playerid], 255);
PlayerTextDrawFont(playerid, RADIONAME[playerid], 2);
PlayerTextDrawSetProportional(playerid, RADIONAME[playerid], 1);
PlayerTextDrawSetShadow(playerid, RADIONAME[playerid], 0);
PHP:
if(_:clickedid == INVALID_TEXT_DRAW)
{
if(GetPVarInt(playerid,"Radio"))
{
for(new j; j < 9; j++) TextDrawHideForPlayer(playerid,RADIO_TD[j]);
PlayerTextDrawHide(playerid,RADIONAME[playerid]);
DeletePVar(playerid, "Radio");
}
}
if(clickedid == RADIO_TD[4]) //>
{
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
ChooseRadio[playerid] += 1;
if(ChooseRadio[playerid] == 5) ChooseRadio[playerid] = 0;
if(ChooseRadio[playerid] == 0) return StopAudioStreamForPlayer(playerid),PlayerTextDrawSetString(playerid,RADIONAME[playerid],FixText("Выключено"));
StopAudioStreamForPlayer(playerid),PlayAudioStreamForPlayer(playerid, RadioURL[ChooseRadio[playerid]]),PlayerTextDrawSetString(playerid,RADIONAME[playerid],FixText(RadioNames[ChooseRadio[playerid]]));
}
if(clickedid == RADIO_TD[5]) //<
{
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
ChooseRadio[playerid] -= 1;
if(ChooseRadio[playerid] < 0) ChooseRadio[playerid] = 4;
if(ChooseRadio[playerid] == 0) return StopAudioStreamForPlayer(playerid),PlayerTextDrawSetString(playerid,RADIONAME[playerid],FixText("Выключено"));
StopAudioStreamForPlayer(playerid),PlayAudioStreamForPlayer(playerid, RadioURL[ChooseRadio[playerid]]),PlayerTextDrawSetString(playerid,RADIONAME[playerid],FixText(RadioNames[ChooseRadio[playerid]]));
}
if(clickedid == RADIO_TD[6]) //CLOSE
{
for(new j; j < 9; j++) TextDrawHideForPlayer(playerid,RADIO_TD[j]);
PlayerTextDrawHide(playerid,RADIONAME[playerid]);
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
CancelSelectTextDraw(playerid);
}
PHP:
CMD:radio(playerid)
{
for(new j = 0; j < 9; j++) TextDrawShowForPlayer(playerid,RADIO_TD[j]),SetPVarInt(playerid,"Radio",1),SelectTextDraw(playerid,0x0B3575FF);
PlayerTextDrawShow(playerid,RADIONAME[playerid]);
PlayerTextDrawSetString(playerid,RADIONAME[playerid],FixText(RadioNames[ChooseRadio[playerid]]));
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
return 1;
}
PHP:
RADIO_TD[0] = TextDrawCreate(287.000000, 308.562500, "ld_beat:chit");
TextDrawLetterSize(RADIO_TD[0], 0.000000, 0.000000);
TextDrawTextSize(RADIO_TD[0], 71.000000, 65.000000);
TextDrawAlignment(RADIO_TD[0], 1);
TextDrawColor(RADIO_TD[0], COLOR_1);
TextDrawSetShadow(RADIO_TD[0], 0);
TextDrawSetOutline(RADIO_TD[0], 0);
TextDrawBackgroundColor(RADIO_TD[0], 255);
TextDrawFont(RADIO_TD[0], 4);
TextDrawSetProportional(RADIO_TD[0], 0);
TextDrawSetShadow(RADIO_TD[0], 0);
RADIO_TD[1] = TextDrawCreate(255.500000, 342.250000, "LD_SPAC:white");
TextDrawLetterSize(RADIO_TD[1], 0.000000, 0.000000);
TextDrawTextSize(RADIO_TD[1], 137.000000, 26.000000);
TextDrawAlignment(RADIO_TD[1], 1);
TextDrawColor(RADIO_TD[1], COLOR_1);
TextDrawSetShadow(RADIO_TD[1], 0);
TextDrawSetOutline(RADIO_TD[1], 0);
TextDrawBackgroundColor(RADIO_TD[1], 255);
TextDrawFont(RADIO_TD[1], 4);
TextDrawSetProportional(RADIO_TD[1], 0);
TextDrawSetShadow(RADIO_TD[1], 0);
RADIO_TD[2] = TextDrawCreate(267.599975, 321.687500, "ld_beat:chit");
TextDrawLetterSize(RADIO_TD[2], 0.000000, 0.000000);
TextDrawTextSize(RADIO_TD[2], 110.000000, 47.000000);
TextDrawAlignment(RADIO_TD[2], 1);
TextDrawColor(RADIO_TD[2], COLOR_1);
TextDrawSetShadow(RADIO_TD[2], 0);
TextDrawSetOutline(RADIO_TD[2], 0);
TextDrawBackgroundColor(RADIO_TD[2], 255);
TextDrawFont(RADIO_TD[2], 4);
TextDrawSetProportional(RADIO_TD[2], 0);
TextDrawSetShadow(RADIO_TD[2], 0);
RADIO_TD[3] = TextDrawCreate(292.700012, 312.937500, "ld_beat:chit");
TextDrawLetterSize(RADIO_TD[3], 0.000000, 0.000000);
TextDrawTextSize(RADIO_TD[3], 60.000000, 50.000000);
TextDrawAlignment(RADIO_TD[3], 1);
TextDrawColor(RADIO_TD[3], COLOR_2);
TextDrawSetShadow(RADIO_TD[3], 0);
TextDrawSetOutline(RADIO_TD[3], 0);
TextDrawBackgroundColor(RADIO_TD[3], 255);
TextDrawFont(RADIO_TD[3], 4);
TextDrawSetProportional(RADIO_TD[3], 0);
TextDrawSetShadow(RADIO_TD[3], 0);
RADIO_TD[4] = TextDrawCreate(375.500000, 357.387542, "NEXT");
TextDrawLetterSize(RADIO_TD[4], 0.150499, 0.821250);
TextDrawTextSize(RADIO_TD[4], 5.000000, 27.000000);
TextDrawAlignment(RADIO_TD[4], 2);
TextDrawColor(RADIO_TD[4], -1);
TextDrawUseBox(RADIO_TD[4], 1);
TextDrawBoxColor(RADIO_TD[4], COLOR_2);
TextDrawSetShadow(RADIO_TD[4], 0);
TextDrawSetOutline(RADIO_TD[4], 0);
TextDrawBackgroundColor(RADIO_TD[4], 255);
TextDrawFont(RADIO_TD[4], 2);
TextDrawSetProportional(RADIO_TD[4], 1);
TextDrawSetShadow(RADIO_TD[4], 0);
TextDrawSetSelectable(RADIO_TD[4], true);
RADIO_TD[5] = TextDrawCreate(272.099945, 357.387542, "PREV");
TextDrawLetterSize(RADIO_TD[5], 0.150499, 0.821250);
TextDrawTextSize(RADIO_TD[5], 5.000000, 27.000000);
TextDrawAlignment(RADIO_TD[5], 2);
TextDrawColor(RADIO_TD[5], -1);
TextDrawUseBox(RADIO_TD[5], 1);
TextDrawBoxColor(RADIO_TD[5], COLOR_2);
TextDrawSetShadow(RADIO_TD[5], 0);
TextDrawSetOutline(RADIO_TD[5], 0);
TextDrawBackgroundColor(RADIO_TD[5], 255);
TextDrawFont(RADIO_TD[5], 2);
TextDrawSetProportional(RADIO_TD[5], 1);
TextDrawSetShadow(RADIO_TD[5], 0);
TextDrawSetSelectable(RADIO_TD[5], true);
RADIO_TD[6] = TextDrawCreate(368.000000, 346.012542, "CLOSE");
TextDrawLetterSize(RADIO_TD[6], 0.150499, 0.821250);
TextDrawTextSize(RADIO_TD[6], 5.000000, 42.000000);
TextDrawAlignment(RADIO_TD[6], 2);
TextDrawColor(RADIO_TD[6], -1);
TextDrawUseBox(RADIO_TD[6], 1);
TextDrawBoxColor(RADIO_TD[6], COLOR_2);
TextDrawSetShadow(RADIO_TD[6], 0);
TextDrawSetOutline(RADIO_TD[6], 0);
TextDrawBackgroundColor(RADIO_TD[6], 255);
TextDrawFont(RADIO_TD[6], 2);
TextDrawSetProportional(RADIO_TD[6], 1);
TextDrawSetShadow(RADIO_TD[6], 0);
TextDrawSetSelectable(RADIO_TD[6], true);
RADIO_TD[7] = TextDrawCreate(280.000000, 346.012542, "RADIO");
TextDrawLetterSize(RADIO_TD[7], 0.150499, 0.821250);
TextDrawTextSize(RADIO_TD[7], 0.000000, 42.000000);
TextDrawAlignment(RADIO_TD[7], 2);
TextDrawColor(RADIO_TD[7], -1);
TextDrawUseBox(RADIO_TD[7], 1);
TextDrawBoxColor(RADIO_TD[7], COLOR_2);
TextDrawSetShadow(RADIO_TD[7], 0);
TextDrawSetOutline(RADIO_TD[7], 0);
TextDrawBackgroundColor(RADIO_TD[7], 255);
TextDrawFont(RADIO_TD[7], 2);
TextDrawSetProportional(RADIO_TD[7], 1);
TextDrawSetShadow(RADIO_TD[7], 0);
RADIO_TD[8] = TextDrawCreate(265.500000, 245.125000, "");
TextDrawLetterSize(RADIO_TD[8], 0.000000, 0.000000);
TextDrawTextSize(RADIO_TD[8], 124.000000, 109.000000);
TextDrawAlignment(RADIO_TD[8], 1);
TextDrawColor(RADIO_TD[8], -1);
TextDrawSetShadow(RADIO_TD[8], 0);
TextDrawSetOutline(RADIO_TD[8], 0);
TextDrawBackgroundColor(RADIO_TD[8], 271857664);
TextDrawFont(RADIO_TD[8], 5);
TextDrawSetProportional(RADIO_TD[8], 0);
TextDrawSetShadow(RADIO_TD[8], 0);
TextDrawSetPreviewModel(RADIO_TD[8], 19421);
TextDrawSetPreviewRot(RADIO_TD[8], 90.000000, 0.000000, 0.000000, 1.000000);
PHP:
stock FixText(string[]) {
new result[256];
for(new i=0; i < 256; i++) {
switch(string[i]) {
case 'а':result[i] = 'a';
case 'А':result[i] = 'A';
case 'б':result[i] = '—';
case 'Б':result[i] = 'Ђ';
case 'в':result[i] = 'ў';
case 'В':result[i] = '‹';
case 'г':result[i] = '™';
case 'Г':result[i] = '‚';
case 'д':result[i] = 'љ';
case 'Д':result[i] = 'ѓ';
case 'е':result[i] = 'e';
case 'Е':result[i] = 'E';
case 'ё':result[i] = 'e';
case 'Ё':result[i] = 'E';
case 'ж':result[i] = '›';
case 'Ж':result[i] = '„';
case 'з':result[i] = 'џ';
case 'З':result[i] = '€';
case 'и':result[i] = 'њ';
case 'И':result[i] = '…';
case 'й':result[i] = 'њ';
case 'Й':result[i] = '…';
case 'к':result[i] = 'k';
case 'К':result[i] = 'K';
case 'л':result[i] = 'ћ';
case 'Л':result[i] = '‡';
case 'м':result[i] = 'Ї';
case 'М':result[i] = 'M';
case 'н':result[i] = '®';
case 'Н':result[i] = '';
case 'о':result[i] = 'o';
case 'О':result[i] = 'O';
case 'п':result[i] = 'Ј';
case 'П':result[i] = 'Њ';
case 'р':result[i] = 'p';
case 'Р':result[i] = 'P';
case 'с':result[i] = 'c';
case 'С':result[i] = 'C';
case 'т':result[i] = '¦';
case 'Т':result[i] = 'Џ';
case 'у':result[i] = 'y';
case 'У':result[i] = 'Y';
case 'ф':result[i] = '˜';
case 'Ф':result[i] = 'Ѓ';
case 'х':result[i] = 'x';
case 'Х':result[i] = 'X';
case 'ц':result[i] = ' ';
case 'Ц':result[i] = '‰';
case 'ч':result[i] = '¤';
case 'Ч':result[i] = 'Ќ';
case 'ш':result[i] = 'Ґ';
case 'Ш':result[i] = 'Ћ';
case 'щ':result[i] = 'Ў';
case 'Щ':result[i] = 'Љ';
case 'ь':result[i] = '©';
case 'Ь':result[i] = '’';
case 'ъ':result[i] = 'ђ';
case 'Ъ':result[i] = '§';
case 'ы':result[i] = 'Ё';
case 'Ы':result[i] = '‘';
case 'э':result[i] = 'Є';
case 'Э':result[i] = '“';
case 'ю':result[i] = '«';
case 'Ю':result[i] = '”';
case 'я':result[i] = '¬';
case 'Я':result[i] = '•';
default:result[i]=string[i];
}
}
return result;
}
Последнее редактирование: