Jump to content

Requesting Tutorial Audio!


Pinki950

Recommended Posts

In loc de X, Y, Z pui coordonatele zonei.

[pawn]

public OnPlayerUpdate( playerid )

{

new

bool: bPlay = false;

    for( new i = 0; i < MAX_PLAYERS; i++ )

{

    if( IsPlayerInRangeOfPoint( i, 7.0, X, Y, Z ) && bPlay == false )

    {

        bPlay = true;

        PlayAudioStreamForPlayer( i, "url" );

}

else if( bPlay == true )

{

StopAudioStreamForPlayer( i );

bPlay = false;

}

   

}

return 1;

}

[/pawn]

EDIT:

Acum mi-am dat seama, variabila bPlay creazo inafara callback-ului OnPlayerUpdate.

Daca o lasi cum am facut la inceput, serverul va incerca sa o creeze de fiecare data cand este executat OnPlayerUpdate, adica odata la cateva milisecunde.

Just Rock

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.