06.03.2013, 09:15
If you want to set the radio for all players:
-make a global variable:
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
-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");
}
}
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