Problem with Audio
#1

i make a radio with aduio stream but i have a littel problem

Код:
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72851) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72845) : warning 204: symbol is assigned a value that is never used: "distance"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72866) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72860) : warning 204: symbol is assigned a value that is never used: "distance"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72881) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72875) : warning 204: symbol is assigned a value that is never used: "distance"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72896) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72890) : warning 204: symbol is assigned a value that is never used: "distance"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72911) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72905) : warning 204: symbol is assigned a value that is never used: "distance"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72926) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72920) : warning 204: symbol is assigned a value that is never used: "distance"
C:\Users\Robin\Desktop\New rp\gamemodes\RMRP.pwn(72951) : error 017: undefined symbol "StopAudioStreamForPlayer"
dialog
Код:
if(dialogid == DIALOG_RADIOSTATION)
	{
		if(!response) return ShowPlayerDialog(playerid,DIALOG_CRADIO,DIALOG_STYLE_MSGBOX,"Radio","Select what you wish to do","Turn On","Turn Off");
		if(response)
		{
		    switch(listitem)
		    {
		        case 0:
		        {
                    for(new i; i < MAX_PLAYERS; i++)
					{
                        new Float:x, Float:y, Float:z,Float:distance = 3.0;
                        GetPlayerPos(playerid,x,y,z);
                        if(IsPlayerInRangeOfPoint(i,3.0,x,y,z))
						{
                            if(IsPlayerInAnyVehicle(playerid))
							{
                                PlayAudioStreamForPlayer(i,"http://www.bum-files.com/internetradio/stations/top-hits1.asx",x,y,z,distance,0);
                            }
                        }
                    }
                }
                case 1:
                {
                    for(new i; i < MAX_PLAYERS; i++)
					{
                        new Float:x, Float:y, Float:z,Float:distance = 3.0;
                        GetPlayerPos(playerid,x,y,z);
                        if(IsPlayerInRangeOfPoint(i,3.0,x,y,z))
						{
                            if(IsPlayerInAnyVehicle(playerid))
							{
                                PlayAudioStreamForPlayer(i,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283896",x,y,z,distance,0);
                            }
                        }
                    }
                }
                case 2:
                {
                    for(new i; i < MAX_PLAYERS; i++)
					{
                        new Float:x, Float:y, Float:z,Float:distance = 3.0;
                        GetPlayerPos(playerid,x,y,z);
                        if(IsPlayerInRangeOfPoint(i,3.0,x,y,z))
						{
                            if(IsPlayerInAnyVehicle(playerid))
							{
                                PlayAudioStreamForPlayer(i,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=213419",x,y,z,distance,0);
                            }
                        }
                    }
                }
                case 3:
                {
                    for(new i; i < MAX_PLAYERS; i++)
					{
                        new Float:x, Float:y, Float:z,Float:distance = 3.0;
                        GetPlayerPos(playerid,x,y,z);
                        if(IsPlayerInRangeOfPoint(i,3.0,x,y,z))
						{
                            if(IsPlayerInAnyVehicle(playerid))
							{
                                PlayAudioStreamForPlayer(i,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=309596",x,y,z,distance,0);
                            }
                        }
                    }
                }
                case 4:
                {
                    for(new i; i < MAX_PLAYERS; i++)
					{
                        new Float:x, Float:y, Float:z,Float:distance = 3.0;
                        GetPlayerPos(playerid,x,y,z);
                        if(IsPlayerInRangeOfPoint(i,3.0,x,y,z))
						{
                            if(IsPlayerInAnyVehicle(playerid))
							{
                                PlayAudioStreamForPlayer(i,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280855",x,y,z,distance,0);
                            }
                        }
                    }
                }
                case 5:
                {
                    for(new i; i < MAX_PLAYERS; i++)
					{
                        new Float:x, Float:y, Float:z,Float:distance = 3.0;
                        GetPlayerPos(playerid,x,y,z);
                        if(IsPlayerInRangeOfPoint(i,3.0,x,y,z))
						{
                            if(IsPlayerInAnyVehicle(playerid))
							{
                                PlayAudioStreamForPlayer(i,"http://k003.kiwi6.com/hotlink/5hg5uq0p9u/mange_makers_mange_bjuder_official_video.mp3",x,y,z,distance,0);
                            }
                        }
                    }
                }
			}
		}
		return 1;
	}
	if(dialogid == DIALOG_CRADIO)
	{
	    if(response)
	    {
    	    ShowPlayerDialog(playerid,DIALOG_RADIOSTATION,DIALOG_STYLE_LIST,""COL_BLUE"Radio Stations",""COL_RED"Hip-Hop\n"COL_RED"Pop\n"COL_RED"Country\n"COL_RED"Comedy\n"COL_RED"Reagge\n"COL_RED"Mange Makers(CD)","Select","Back");
		}
		else if(!response)
		{
  			for(new i; i < MAX_PLAYERS; i++)
			{
				new Float:x, Float:y, Float:z;
				GetPlayerPos(playerid,x,y,z);
				if(IsPlayerInRangeOfPoint(i,3.0,x,y,z))
				{
					if(IsPlayerInAnyVehicle(playerid))
					{
						StopAudioStreamForPlayer(i);
					}
				}
			}
		}
		return 1;
Reply
#2

Update your includes to the 0.3d ones.
Reply
#3

Quote:
Originally Posted by FuTuяe
Посмотреть сообщение
Update your includes to the 0.3d ones.
there no include for PlayAudioStreamForPlayer
Reply
#4

Well, if this will make it any easier for you, add this in your script:

pawn Код:
native PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
native StopAudioStreamForPlayer(playerid);
Reply
#5

Quote:
Originally Posted by FuTuяe
Посмотреть сообщение
Well, if this will make it any easier for you, add this in your script:

pawn Код:
native PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
native StopAudioStreamForPlayer(playerid);
No. I would recommend him updating all server files to 0.3d in stead.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)