PlayAudioSteamForPlayer Question
#1

Would it be possible if a player is within a certain area such as a x.y.z without having to type a command to engage the PlayAudioSteamForPlayer ? Example.... Let's say I enter the interior of jizzy's club how would I make it start PlayAudioSteamForPlayer ? What would it go under ?
Reply
#2

I would put it at the top of your script, and use something like:
pawn Код:
If(IsPlayerInRangeOfPoint(playerid, X Cord, Y Cord, Z Cord);
{
//Your Audio stream file shit
}
else
{
//Stopping the Audio Stream File once your leave the area
}
If I helped, feel free to rep me!
Reply
#3

Quote:
Originally Posted by nmader
Посмотреть сообщение
I would put it at the top of your script, and use something like:
pawn Код:
If(IsPlayerInRangeOfPoint(playerid, X Cord, Y Cord, Z Cord);
{
//Your Audio stream file shit
}
else
{
//Stopping the Audio Stream File once your leave the area
}
If I helped, feel free to rep me!
Hmm where would I put it in my script tho ?
Reply
#4

I personally, would stick it under all your defines, as I don't believe it falls under any callback, so near the top, above on GameModeInit. (or FilterScriptInit if you are making it a filterscript)
Reply
#5

Quote:
Originally Posted by nmader
Посмотреть сообщение
I personally, would stick it under all your defines, as I don't believe it falls under any callback, so near the top, above on GameModeInit. (or FilterScriptInit if you are making it a filterscript)
I put this on my OnGameModeInit

pawn Код:
foreach(Player, i)
    {
        if(IsPlayerInRangeOfPoint(i, 30.0, -2062.4739,487.5359,139.7422))
        {
            PlayAudioStreamForPlayer(i, "http://ifitsgood.files.wordpress.com/2008/05/16-come-fly-with-me.mp3");
        }
    }
Whats wrong with this ?
Reply
#6

pawn Код:
public OnPlayerInteriorChange(playerid,newinteriorid,oldinteriorid)
{
if(newinteriorid==/*[Enter Jezzy's interior here]*/)
{
PlayAudioStreamForPlayer(playerid, "http://ifitsgood.files.wordpress.com/2008/05/16-come-fly-with-me.mp3");
}
return 1;
}
then do when oldinteriorid == Jezzy's do Stop player Audio
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)