SA-MP Forums Archive
Restricting Audio Stream - 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: Restricting Audio Stream (/showthread.php?tid=295607)



Restricting Audio Stream - Infamous - 06.11.2011

Right now I am proberly overlooking something right infront of me, but the audio stream still plays inside of these vehicles and it shouldn't.

Any ideas on what's causing the problem?

pawn Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 598 || GetVehicleModel(GetPlayerVehicleID(playerid)) != 497)
    {
        PlayAudioStreamForPlayer(playerid, "-snip-");
    }
}



Re: Restricting Audio Stream - Sascha - 06.11.2011

use
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 598 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 497)



Re: Restricting Audio Stream - Infamous - 06.11.2011

How stupid of me, thankyou for pointing out I used 'or' instead of 'and', I have just been staring at the code for 30 mins lol. <3