Audio Not working
#1

Hello need help with this code :

Код:
if (PRESSED(KEY_CTRL_BACK))
	{
	    //if(PlayerInfo[playerid][JobID] == 15)
	    //{
	        if(IsPlayerInAnyVehicle(playerid))
        	{
        	for(new i=0; i<sizeof(PasienioCar); i++)
			{
		        if(GetPlayerVehicleID(playerid) == PasienioCar[i])
		        {
	                if(UsedH[playerid] == false)
					{
     					new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
				        GetPlayerPos(playerid, X, Y, Z);
						PlayAudioStreamForPlayer(playerid, "http://127.0.0.1/siren/sound_011.wav", X, Y, Z, Distance, 1);
						UsedH[playerid] = true;
					}
					else if(UsedH[playerid] == true)
					{
					    StopAudioStreamForPlayer(playerid);
						UsedH[playerid] = false;
					}
				}
			}
			}

		//}
	}
i have 17 cars ( my car variable is PasienioCar[0-16])that i want to play this file when i press H but its doesnt play anything
i have tested this with :
Код:
if(strcmp(cmdtext, "/play", true) == 0)
	  {
	    new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
				        GetPlayerPos(playerid, X, Y, Z);
						PlayAudioStreamForPlayer(playerid, "http://127.0.0.1/siren/sound_011.wav", X, Y, Z, Distance, 1);
	  }
its working but if i get to the car and press h its not working , i think is about vehicle id but i dont know how to make work please help
Reply


Messages In This Thread
Audio Not working - by cyberlord - 26.12.2014, 20:36
Re: Audio Not working - by cyberlord - 26.12.2014, 22:42

Forum Jump:


Users browsing this thread: 1 Guest(s)