audio problem
#1

i found Previous issue.
but now i need play Different audio for killer.
Reply
#2

pawn Код:
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=69351");
Change "playerid" for "killerid".
Reply
#3

no no random audio for killer.
Reply
#4

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;
}
Reply
#5

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;
}
Reply
#6

Quote:
Originally Posted by GeneralAref
Посмотреть сообщение
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;
}
I'd go with the example I posted, but it's your choice. That would work too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)