Small question
#2

Код:
CMD:radio(playerid, params[])
{
    new string[128], url[126];
    new id = strval(params[0]);
    if(playerVariables[playerid][pAdminLevel] >= 3)
    {
        switch(id) {
			case 1: format(url, sizeof(url), "http://www.symphonyofnoise.com/binv2/ListenRap/06.Tupac-HailMairy.mp3");
			default: return 1;
        }
		
		for(new i = 0; i < MAX_PLAYERS; i++) {
			PlayAudioStreamForPlayer(i, url);
		}

        GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "Music Admin: %s has started the Song Tupac - Hail mary", szPlayerName);
        SendClientMessageToAll(COLOR_LIGHTRED, string);
    }
    return 1;
}
Try this.

You may also want to make it so that if someone just types /radio in, or an invalid radio number, it shows a list of the songs.
Reply


Messages In This Thread
Small question - by ikbenremco - 22.04.2012, 19:51
Re: Small question - by Alternative112 - 22.04.2012, 22:55
Re: Small question - by ikbenremco - 23.04.2012, 14:07
Re: Small question - by ikbenremco - 24.04.2012, 14:30

Forum Jump:


Users browsing this thread: 1 Guest(s)