16.07.2012, 18:02
So i tried to do a /c4 command but i kept getting errors and i dont understand why
The errors
Please help
Thanks
pawn Код:
BombPos;
pawn Код:
command(c4, playerid, params[]) {
new
Float:BombPosx,
Float:BombPosy,
Float:BombPosz;
if(Player[playerid][Group] == 2)
{
if(Player[playerid][C4] == 0)
{
GetPlayerPos(playerid, BombPosx, BombPosy, BombPosz);
Player[playerid][C4] = 1;
ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant", 3.1, 0, 1, 1, 1, 1);
TogglePlayerControllable(playerid, true);
SendClientMessage(playerid, WHITE, "You have planted a C4.");
ERROR > Player[playerid][BombPos][0] = BombPosx;
Player[playerid][BombPos][1] = BombPosy;
Player[playerid][BombPos][2] = BombPosz;
CreatePlayer3DTextLabel(playerid, "Bomb Planted", RED, Player[playerid][BombPos][0],Player[playerid][BombPos][1], Player[playerid][BombPos][2], 1000, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1);
}
else if(Player[playerid][C4] == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 5, Player[playerid][BombPos][0], Player[playerid][BombPos][1], Player[playerid][BombPos][2]))
{
ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant", 3.1, 0, 1, 1, 1, 1);
TogglePlayerControllable(playerid, true);
SendClientMessage(playerid, WHITE, "You have picked your C4 up.");
Player[playerid][C4] = 0;
DeletePlayer3DTextLabel(playerid, PlayerText3D:0);
}
}
}
else return 0;
return 1;
}
pawn Код:
warning 217: loose indentation
warning 215: expression has no effect
error 001: expected token: ";", but found "["
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line
Thanks