15.04.2012, 14:18
pawn Код:
COMMAND:airstrike(playerid, params[])
{
if(GetPlayerScore(playerid) < 2000) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough score, you need 2000 score");
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough money.");
GivePlayerMoney(playerid,-10000);
SendClientMessage(playerid, 0xFF0000FF, "Air Strike Successfully Done!");
SetTimerEx("ExplodeBomb", 5000, false, "i", playerid);
return 1;
}
forward ExplodeBomb(playerid);
public ExplodeBomb(playerid)
{
new Float: Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
CreateExplosion(Pos[0], Pos[1], Pos[2], 7, 20.0);
return 1;
}
@@ cjgogo, your code won't work, because the player that uses the command should have less than 2000 score.