PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=69351");
// ** 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;
}
public OnPlayerDeath(playerid,killerid,reason) { new url[120]; switch(random(5)) { case 0: url="..."; case 1: url="..."; case 2: url="..."; case 3: url="..."; case 4: url="..."; //your URLs in these fields. Add more or less depends of number of your sounds. } PlayAudioStreamForPlayer(playerid,url,0.0,0.0,0.0,0.0,0); return 1; }
how about this?
Код:
public OnPlayerDeath(playerid,killerid,reason) { new url[120]; switch(random(5)) { case 0: url="..."; case 1: url="..."; case 2: url="..."; case 3: url="..."; case 4: url="..."; //your URLs in these fields. Add more or less depends of number of your sounds. } PlayAudioStreamForPlayer(playerid,url,0.0,0.0,0.0,0.0,0); return 1; } |