12.05.2009, 17:44
Sorry, I forgot to put the apostrophe (") in the SendClientMEssage.
Try it now and it should work.
Try it now and it should work.
pawn Код:
if (strcmp("/plantbomb", cmdtext, true, 7) == 0)
{
if(bombh[playerid] == 1)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_GRAD2,"You can't plant bombs from a vehicle!");
new Float:X;
new Float:Y;
new Float:Z;
new Float:A;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid, A);
DestroyObject(bomb);
X += (1 * floatsin(-A, degrees));
Y += (1 * floatcos(-A, degrees));
bomb = CreateObject(1654, X, Y, Z-0.8, 0, 0, 0);
bombh[playerid]=0;
bombp[playerid]=1;
}
else
{
SendClientMessage(playerid,COLOR_GRAD2,"* You don't have a bomb to plant!");
return 1;
}
return 1;
}