17.12.2015, 19:13
pawn Код:
// ** INCLUDES
#include <a_samp>
// ** ARRAYS AND ENUMERATORS
enum eRandomStreams
{
random_stream_url[128],
};
static const aRandomStreams[][eRandomStreams] =
{
{"example.com/audio.mp3"},
{"example.com/audio.mp3"},
{"example.com/audio.mp3"}
};
// ** MAIN
main()
{
print("Loaded \"random_streams.amx\".");
}
// ** CALLBACKS
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
PlayAudioStreamForPlayer(playerid, aRandomStreams[random(sizeof(aRandomStreams))][random_stream_url]);
return 1;
}