03.01.2014, 16:23
Hey guys i hope you help me!, After Planting a bomb c4 [/plantbomb] and pressing on the left buttom, it should be destroyed but nothing happens, only the Object disappear, that's all
Код:
if(strcmp(cmdtext, "/plantbomb", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pBombs] == 0) { SendClientMessage(playerid,COLOR_GRAD2," You don't have any C4 Explosives !"); return 1; } if(IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid,COLOR_GRAD2," You can't do that while in a vehicle !"); return 1; } if(PlayerTied[playerid] != 0 || PlayerCuffed[playerid] != 0 || PlayerFrozen[playerid] != 0) { SendClientMessage(playerid, COLOR_GREY, " You can't do that at this time !"); return 1; } new Float:X,Float:Y,Float:Z,Float:A; ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 1); GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid, A); DestroyDynamicObject(BombID[playerid]); X += (1 * floatsin(-A, degrees)); Y += (1 * floatcos(-A, degrees)); BombID[playerid] = CreateDynamicObject(1654, X, Y, Z-0.9, 0, 90, 0); ResetPlayerWeapons(playerid); GivePlayerGun(playerid, 40); PlayerInfo[playerid][pBombs]--; SendClientMessage(playerid, COLOR_LIGHTBLUE,"* You have placed the C4, the device is now armed."); return 1; } return 1; }