02.02.2012, 01:36
Why does it spam the USS Seawolf Message 20 times in game ?
pawn Код:
CMD:tacticalnuke(playerid, params[])
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
new Float: pos[3];
new string[128];
new Float:aX, Float:aY, Float:aZ;
GetPlayerPos(playerid, aX, aY, aZ);
if(sscanf(params, "fff", pos[0], pos[1], pos[2])) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /tacticalnuke [x coordinate] [y coordinate] [z coordinate]");
foreach(Player, i)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, -3130.6731,75.3724,1501.5393))
{
format(string, sizeof(string), "A Tactical Nuke has been launched from the USS Seawolf");
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
CreateExplosion(pos[0], pos[1], pos[2]+20, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+21, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+22, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+23, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+24, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+25, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+26, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+27, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+28, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+29, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+30, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+30, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+30, 7, 1000);
CreateExplosion(pos[0], pos[1], pos[2]+30, 7, 1000);
PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/7fn9uqt6b4/modern_warfare_2_tactical_nuke_sound.mp3", aX, aY, aZ, 10, 1);
}
}
}
return 1;
}

