Detaljan opis problema: pa skinuo sam davno neki radiosystem sa TD-ovima i sve je lijepo radilo do sad nece da prikaze TD-ove ali kada kucam broj u chat pusti mi pjesmu ? vidjet cete dole u skripti..
Dio skripte:
#include
#include
#define COLOR_ERROR 0xE60000FF
#define COLOR_SKYBLUE 0x00B6FFFF
new Radio_on;
new Radio_viewing;
new Text:Radio;
stock HideRadioTextdraws(playerid)
{
TextDrawHideForPlayer(playerid,Radio);
TextDrawHideForPlayer(playerid,Radio);
TextDrawHideForPlayer(playerid,Radio);
TextDrawHideForPlayer(playerid,Radio);
Radio_viewing =0;
return 1;
}
public OnGameModeInit()
{
Radio = TextDrawCreate(118.000000, 122.000000, "~l~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~N~~N~~N~");
TextDrawAlignment(Radio, 2);
TextDrawBackgroundColor(Radio, 255);
TextDrawFont(Radio, 1);
TextDrawLetterSize(Radio, 0.500000, 1.000000);
TextDrawColor(Radio, -1);
TextDrawSetOutline(Radio, 0);
TextDrawSetProportional(Radio, 1);
TextDrawSetShadow(Radio, 1);
TextDrawUseBox(Radio, 1);
TextDrawBoxColor(Radio, 0x00000045);
TextDrawTextSize(Radio, -1.000000, 212.000000);
TextDrawSetSelectable(Radio, 0);
Radio = TextDrawCreate(120.000000, 131.000000, "~g~Radio");
TextDrawAlignment(Radio, 2);
TextDrawBackgroundColor(Radio, 255);
TextDrawFont(Radio, 3);
TextDrawLetterSize(Radio, 0.460000, 1.299999);
TextDrawColor(Radio, -1);
TextDrawSetOutline(Radio, 1);
TextDrawSetProportional(Radio, 1);
TextDrawSetSelectable(Radio, 0);
Radio = TextDrawCreate(34.5, 155.000000, "~y~1 ~w~- Radio Balkan ~N~~Y~2 ~W~- Radio Pingvin~N~~Y~3 ~W~- Radio B92~N~~Y~4 ~W~- Radio Morava~N~~Y~5 ~W~- Radio City~N~~Y~6 ~W~- Radio Jazz~N~~Y~7 ~W~- Radio Rock~N~~Y~8 ~W~- Radio Rap~N~~Y~9 ~W~- Radio Cool~N~~Y~10 ~W~- ~R~~H~OFF");
TextDrawAlignment(Radio, 1);
TextDrawBoxColor(Radio, 255);
TextDrawFont(Radio, 1);
TextDrawLetterSize(Radio, 0.230000, 1.000000);
TextDrawColor(Radio, -1);
TextDrawSetOutline(Radio, 1);
TextDrawSetProportional(Radio, 1);
TextDrawSetSelectable(Radio, 0);
Radio = TextDrawCreate(121.000000, 250.000000, "~w~Pritisni slovo ~y~T~w~ i odaberi radio ~n~~w~Pritisni ~y~LMB~w~ da zatvoris prozor");
TextDrawAlignment(Radio, 2);
TextDrawBackgroundColor(Radio, 255);
TextDrawFont(Radio, 1);
TextDrawLetterSize(Radio, 0.230000, 1.000000);
TextDrawColor(Radio, -1);
TextDrawSetOutline(Radio, 1);
TextDrawSetProportional(Radio, 1);
TextDrawSetSelectable(Radio, 0);
return 1;
}
public OnPlayerText(playerid,text[])
{
if(Radio_viewing == 1)
{
if(isNumeric(text))
{
new input = strval(text);
switch(input)
{
case 1:
{
SendClientMessage(playerid,COLOR_SKYBLUE,"Radio pocinje...");
PlayAudioStreamForPlayer(playerid, "http://62.138.148.200:8000", 0, 0, 0, 0, 0);
HideRadioTextdraws(playerid);
Radio_on = 1;
return 0;
}
case 2:
{
SendClientMessage(playerid,COLOR_SKYBLUE,"Radio pocinje...");
PlayAudioStreamForPlayer(playerid, "http://50.7.70.66:8559", 0, 0, 0, 0, 0);
HideRadioTextdraws(playerid);
Radio_on = 1;
return 0;
}
case 3:
{
SendClientMessage(playerid,COLOR_SKYBLUE,"Radio pocinje...");
PlayAudioStreamForPlayer(playerid, "http://stream.b92.net:7999/radio-b92.mp3.m3u", 0, 0, 0, 0, 0);
HideRadioTextdraws(playerid);
Radio_on = 1;
return 0;
}
case 4:
{
SendClientMessage(playerid,COLOR_SKYBLUE,"Radio pocinje...");
PlayAudioStreamForPlayer(playerid, "http://78.129.199.49:12100", 0, 0, 0, 0, 0);
HideRadioTextdraws(playerid);
Radio_on = 1;
return 0;
}
case 5:
{
SendClientMessage(playerid,COLOR_SKYBLUE,"Radio pocinje...");
PlayAudioStreamForPlayer(playerid, "http://balkan.dj.topstream.net:8070", 0, 0, 0, 0, 0);
HideRadioTextdraws(playerid);
Radio_on = 1;
return 0;
}
case 6:
{
SendClientMessage(playerid,COLOR_SKYBLUE,"Radio pocinje...");
PlayAudioStreamForPlayer(playerid, "http://listen.radionomy.com/ClassicalJazzRadio", 0, 0, 0, 0, 0);
HideRadioTextdraws(playerid);
Radio_on = 1;
return 0;
}
case 7:
{
SendClientMessage(playerid,COLOR_SKYBLUE,"Radio pocinje...");
PlayAudioStreamForPlayer(playerid, "http://listen.radionomy.com:80/ClassicRockLengendsRadio", 0, 0, 0, 0, 0);
HideRadioTextdraws(playerid);
Radio_on = 1;
return 0;
}
case 8:
{
SendClientMessage(playerid,COLOR_SKYBLUE,"Radio pocinje...");
PlayAudioStreamForPlayer(playerid, "http://50.22.212.196:8102", 0, 0, 0, 0, 0);
HideRadioTextdraws(playerid);
Radio_on = 1;
return 0;
}
case 9:
{
SendClientMessage(playerid,COLOR_SKYBLUE,"Radio pocinje...");
PlayAudioStreamForPlayer(playerid, "http://192.99.13.189:9764", 0, 0, 0, 0, 0);
HideRadioTextdraws(playerid);
Radio_on = 1;
return 0;
}
case 10:
{
if(Radio_on == 0) { SendClientMessage(playerid,COLOR_SKYBLUE,"Radio je vec ugasen"); return 0; }
if(Radio_on == 1)
{
SendClientMessage(playerid,COLOR_SKYBLUE,"Radio ugasen.");
StopAudioStreamForPlayer(playerid);
HideRadioTextdraws(playerid);
Radio_on = 0;
return 0;
}
}
default :
{
SendClientMessage(playerid, COLOR_ERROR,"Pogresan odabir.");
return 0;
}
}
}
}
return 1;
}
CMD:radio(playerid)
{
HideRadioTextdraws(playerid);
TextDrawShowForPlayer(playerid,Radio);
TextDrawShowForPlayer(playerid,Radio);
TextDrawShowForPlayer(playerid,Radio);
TextDrawShowForPlayer(playerid,Radio);
Radio_viewing =1;
return 1;
}
stock isNumeric(const string[])
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string > '9' || string < '0') return 0;
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_FIRE)
{
if(Radio_viewing == 1)
{
HideRadioTextdraws(playerid);
}
}
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno): ///

