SA-MP Forums Archive
Radio links and names - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Radio links and names (/showthread.php?tid=566849)



Radio links and names - vannesenn - 08.03.2015

Hi guys,
I have problem with this double array. I made CMD for test radios and CMD doesn't work. I type "/radiotest 0" and I want to see radio's name and to hear music.

Код:
CMD:radiotest(playerid, params[])
{
	new _id;
	if(sscanf(params, "d", _id)) return (true);
	va_SendClientMessage(playerid, -1, "Radio: %s", _HRP_RadioStanice[_id][false]);
	return PlayAudioStreamForPlayer(playerid, _HRP_RadioStanice[_id][true]);
}

stock const _HRP_RadioStanice[8][] =
{
	{ "Idobi", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897" },
	{ "Jamming 181", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=125192" },
	{ "RockRadio1", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=558051" },
	{ "RauteMusik", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=31645" },
	{ "Unknow Radio", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=12786" },
	{ "True R&B", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=366480" },
	{ "The Box", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=611786" },
	{ "Dirty Shout Radio", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1524202" }
};



Re: Radio links and names - vannesenn - 08.03.2015

Fixed, I failed with additional [] in stock const