18.07.2016, 12:07
PHP код:
if(dialogid == 666)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) >= 400000)
{
if(GetPlayerScore(playerid) >= 2000)
{
GivePlayerMoney(playerid, -400000);
SendClientMessageToAll(red,"Airstrike has been launched in Snake Farm zone.");
anthrax_time = 30;
new ran = random(5);
if(ran == 3){CreateExplosion(q,w,e,7,50.0);}
if(ran == 2){CreateExplosion(q,w+10.0,e,7,50.0);}
if(ran == 1){CreateExplosion(q,w+15.0,e,7,50.0);}
if(ran == 4){CreateExplosion(q+20,w+20.0,e,7,50.0);}
foreach(Player, i)
{
if(IsPlayerInArea(i,-62.5000000000005,2318.359375,23.4375,2390.625))
{
if(gTeam[i]!= gTeam[playerid])
{
new Float:hp[MAX_PLAYERS];
GetPlayerHealth(i, hp[i]);
SetPlayerHealth(i, hp[i]-75);
GameTextForPlayer(i, "~g~YOU ARE INFECTED DIE IDIOT", 4000, 3);
if(hp[i] <= 0)
{
SendDeathMessage(playerid,i,51);
PlayerInfo[i][Deaths] ++;
PlayerInfo[playerid][Kills] ++;
GivePlayerMoney(playerid, 250);
new String[100];
GivePlayerScore(playerid, 1);
format(String,sizeof(String),"Airstrike killed %s +1 Score Earned +250$", GetName(i));
SendClientMessage(playerid, green, String);
}
}else return false;
}
}else SendClientMessage(playerid, RED, "ERROR: You need rank 7 to launch Airstrike!");
}else SendClientMessage(playerid, red, "ERROR: You Need 400000$ cash to launch Airstrike!");
}
}
}
}
}