SA-MP Forums Archive
Interior 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: Interior stream (/showthread.php?tid=596985)



Interior stream - iiMo - 25.12.2015

Hey,

I'm trying to play music in a interior of a base, its not really an interior because its selfmade ( so it has CreateObject ids)

This is the script":

PHP код:
public OnPlayerInteriorChange(playeridnewinterioridoldinteriorid)
{
    if(
GetPlayerInterior(playerid) == baserino)
    {
        
PlayAudioStreamForPlayer(playerid"http://www.hot108.com/hot108.asx"290.9362,1850.3567,994.2917,250.3646,0);
    }
    else
    {
        
StopAudioStreamForPlayer(playerid);
    }
    return 
1;

It doesn't start at all when I enter the interior, but it doesn't show any errors.


Re: Interior stream - iiMo - 25.12.2015

help pl0x


Re: Interior stream - RaajParker - 25.12.2015

Quote:
Originally Posted by iiMo
Посмотреть сообщение
help pl0x
which means it doesnt play music when u enter the intrerior ?


Re: Interior stream - lucamsx - 25.12.2015

What the hell is "baserino"?


Re: Interior stream - iiMo - 25.12.2015

It doesnt play music when I enter the interior yes.
It doesn't show any stream sign in the chat.

Also I removed the interior part and I only put

PHP код:
PlayAudioStreamForPlayer(playerid"http://www.hot108.com/hot108.asx"290.9362,1850.3567,994.2917,250.3646,0); 
still doesnt work though.


Re: Interior stream - lucamsx - 25.12.2015

You can't create your own interiors, like, "baserino" (wtf).
Interior is an integer, like 0, 1, 2, 3, 4...
If you created your base-thingy outside, then it's in interior 0, and if you set up stream to play in int 0, its going to play everywhere. You can use IsPlayerInDynamicArea from Incognito's Streamer to create a zone triggering the stream.


Re: Interior stream - RaajParker - 25.12.2015

AS he said is ryt follow him


Re: Interior stream - iiMo - 25.12.2015

so it has to be like this?

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
if(GetPlayerInterior(playerid) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://www.hot108.com/hot108.asx", 290.9362,1850.3567,994.2917,250.3646,0);
}
else
{
StopAudioStreamForPlayer(playerid);
}
return 1;
}


Re: Interior stream - E7mad - 25.12.2015

He might already defined "baserino" with an integer, "#define baserino 5(whatever).
The problem can be that you are toggling GTA SA radio off.
How to turn it on? Go to the pause menu of GTA SA (ESC), then go to OPTIONS > AUDIO SETUP, then click into the 3rd option "RADIO EQ", it must be "ON" so your radio will work, do not forget to change the volume of the radio (First line).

I hope this reply will help you.
Thanks.


Re: Interior stream - iiMo - 25.12.2015

i put it like this but it still doesnt work:

PHP код:
public OnPlayerInteriorChange(playeridnewinterioridoldinteriorid)
{
if(
GetPlayerInterior(playerid) == 0)
{
PlayAudioStreamForPlayer(playerid"http://www.hot108.com/hot108.asx"294.9009,1843.5282,994.2917,50.0,1);
}
else
{
StopAudioStreamForPlayer(playerid);
}
return 
1;

Also, Radio EQ is on.