11.06.2012, 17:20
Okay so i got the function but something is bugged i don't get to hear the sounds that i told the function to stream. Any idea why it's not working ?
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
if(killerid != INVALID_PLAYER_ID)
{
new url[120];
switch(random(5))
{
// The One Who Kills You Should Hear One Of Those Each Time
case 0: url="http://bigflashgaming.net/sounds/godlike.wav";
case 1: url="http://bigflashgaming.net/sounds/headshot.wav";
case 2: url="http://bigflashgaming.net/sounds/multikill.wav";
case 3: url="http://bigflashgaming.net/sounds/killingspree.wav";
case 4: url="http://bigflashgaming.net/sounds/monsterkil.wav";
case 5: url="http://bigflashgaming.net/sounds/rampage.wav";
case 6: url="http://bigflashgaming.net/sounds/ultrakill.wav";
case 7: url="http://bigflashgaming.net/sounds/humiliation.wav";
}
PlayAudioStreamForPlayer(playerid,url,0.0,0.0,0.0,0.0,0);
SetPlayerScore(killerid, 1);
}
new url[120];
switch(random(5))
{
// When you suicide or get killed you supose to hear those.
case 0: url="http://bigflashgaming.net/sounds/oneandonly.wav";
case 1: url="http://bigflashgaming.net/sounds/maytheforce.wav"; //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);
SetPlayerScore(playerid, -1);
return 1;
}