30.04.2012, 08:27
Guys i have this CMD..
====> When i type /airstrike it explode after 5 sec (thats what i need) but it do not explode on the position where i was standing but explode on me... Please i need that it explodes on the position where i type /airstrike that is where i was standing last....
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;
}
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;
}