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;
}
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);
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SendClientMessage(playerid, 0xFF0000FF, "Air Strike Successfully Done!");
SetTimerEx("ExplodeBomb", 5000, false, "ifff", playerid, Pos[0], Pos[1], Pos[2]);
return 1;
}
public ExplodeBomb(playerid, Float:PosX, Float:PosY, Float:PosZ)
{
CreateExplosion(PosX, PosY, Z, 7, 20.0);
return 1;
}
D:\Game\SA-MP Files\SF Wars\gamemodes\Wars.pwn(1217) : error 025: function heading differs from prototype
D:\Game\SA-MP Files\SF Wars\gamemodes\Wars.pwn(1219) : error 017: undefined symbol "Z"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
CreateExplosion(PosX, PosY, PosZ, 7, 20.0);
====> 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....
|
CreateExplosion(PosX, PosY, PosZ, 7, 20.0); PosX, PosY, PosZ = positions(floats) you know that already! This "7" is the type of bomb "TYPES" This "20.0" Is the explosion radius.
D:\Game\SA-MP Files\SF Wars\gamemodes\Wars.pwn(1217) : error 017: undefined symbol "PosX"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
public ExplodeBomb(playerid) { new Float:PosX, Float:PosY, Float:PosZ; CreateExplosion(PosX, PosY, PosZ, 7, 20.0); return 1; }
D:\Game\SA-MP Files\SF Wars\gamemodes\Wars.pwn(1216) : error 017: undefined symbol "Z"
D:\Game\SA-MP Files\SF Wars\gamemodes\Wars.pwn(1215) : warning 203: symbol is never used: "PosZ"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
I did this. Is is giving this error:
pawn Код:
|
Код:
public ExplodeBomb(playerid) { new Float:PosX, Float:PosY, Float:PosZ; CreateExplosion(PosX, PosY, PosZ, 7, 20.0); return 1; } |
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);
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SendClientMessage(playerid, 0xFF0000FF, "Air Strike Successfully Done!");
SetTimerEx("ExplodeBomb", 5000, false, "ifff", playerid, Pos[0], Pos[1], Pos[2]);
return 1;
}
forward ExplodeBomb(playerid, Float:PosX, Float:PosY, Float:PosZ);
public ExplodeBomb(playerid, Float:PosX, Float:PosY, Float:PosZ)
{
SendClientMessage(playerid, -1, "BOOOOOOM! ! ! !");
CreateExplosion(PosX, PosY, PosZ, 7, 20.0);
return 1;
}