playerplaysound
#1

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;
}
Reply
#2

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;
    }
}
Reply
#3

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?
Reply
#4

Just use:

0.0, 0.0, 0.0
Reply
#5

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? "
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)