SA-MP Forums Archive
playerplaysound - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: playerplaysound (/showthread.php?tid=202784)



playerplaysound - propilot - 25.12.2010

Hey, I want to make something. When two planes are close to eachother there is going to be a sound when they get like 20 netters away the sound will stop

So I am going to try my self fix my errors if there are any! Thank you

pawn Code:
public OnPlayerStreamIn(playerid, forplayerid)
{
    if(IsVehicleAirBorne( GetVehicleModel( GetPlayerVehicleID( playerid ) ) ) )
    new string[40];
    PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
    format(string, sizeof(string), "Player %d is now streamed in for you.", playerid);
    SendClientMessage(forplayerid, 0xFFFFFFFF, string);
    return 1;
}



Re: playerplaysound - Krx17 - 25.12.2010

You forgot the braces. { & }
pawn Code:
public OnPlayerStreamIn(playerid, forplayerid)
{
    if(IsVehicleAirBorne( GetVehicleModel( GetPlayerVehicleID( playerid ) ) ) )
    {
        new string[40];
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
        format(string, sizeof(string), "Player %d is now streamed in for you.", playerid);
        SendClientMessage(forplayerid, 0xFFFFFFFF, string);
        return 1;
    }
}



Re: playerplaysound - propilot - 25.12.2010

Is it correct? When a plane gets close to me while I am flying it will start beeping, and when it gets away arond 15-20 netters it will stop beeping?


Re: playerplaysound - MrDeath537 - 25.12.2010

Just use:

0.0, 0.0, 0.0


Re: playerplaysound - propilot - 25.12.2010

Quote:
Originally Posted by MrDeath
View Post
Just use:

0.0, 0.0, 0.0
:/ Okay. But sorry if it rude, but it didn't answer my question ;'(
"Is it correct? When a plane gets close to me while I am flying it will start beeping, and when it gets away arond 15-20 metters it will stop beeping? "