Streaming Help please? - 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: Streaming Help please? (
/showthread.php?tid=451935)
Streaming Help please? -
NinjahZ - 19.07.2013
Okay so I am creating a Radio System which shall be posted soon for the public but I have a problem,I setup for when the player gets out of the vehicle,the Audio Stream stops,but it does not stop when you fall off your bike,this is what the script looks like.
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
StopAudioStreamForPlayer(playerid);
return 1;
}
How do I setup for when the player falls off a bike?
Re: Streaming Help please? -
Misiur - 19.07.2013
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
if(oldstate == PLAYER_STATE_DRIVER) {
StopAudioStreamForPlayer(playerid);
}
}
Re: Streaming Help please? -
NinjahZ - 19.07.2013
Quote:
Originally Posted by Misiur
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(oldstate == PLAYER_STATE_DRIVER) { StopAudioStreamForPlayer(playerid); } }
|
lol i thought it was that,but had to be sure thanks +rep for helping
Re: Streaming Help please? -
NinjahZ - 19.07.2013
I can also do this right?
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_DRIVER)
{
StopAudioStreamForPlayer(playerid);
}
if(oldstate == PLAYER_STATE_PASSENGER)
{
StopAudioStreamForPlayer(playerid);
}
}
Re: Streaming Help please? -
Misiur - 19.07.2013
Yup. In fact just use or (||) operator:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
{
StopAudioStreamForPlayer(playerid);
}
}
Re: Streaming Help please? -
NinjahZ - 19.07.2013
Quote:
Originally Posted by Misiur
Yup. In fact just use or (||) operator:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) { StopAudioStreamForPlayer(playerid); } }
|
Coool thanks man