Vehicle Radio
#2

If you want to set the radio for all players:
-make a global variable:
pawn Код:
new radio[128] = "http://radio.com"; //just an example
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
     if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
     {
          PlayAudioStreamForPlayer(playerid,radio);
     }
     if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
     {
          PlayAudioStreamForPlayer(playerid,"Radio Stopped");
      }
}
If you want you can make a CMD to change the variable "radio".

Or you can make variable radio[MAX_PLAYERS][128]; and every player can change the stations only for them not for all players(with a dialog box or command etc.)

If you want my radio from my gm i will post it here , but is best for you to make it yourself so you can understant and learn all this
Reply


Messages In This Thread
Vehicle Radio - by Zalman - 06.03.2013, 08:12
Re: Vehicle Radio - by shady001 - 06.03.2013, 09:15

Forum Jump:


Users browsing this thread: 2 Guest(s)