13.05.2017, 19:55
(
Last edited by adrianlouise; 26/05/2017 at 05:41 PM.
)
When You type Detonate CMD :
Code:
CMD:detonate(playerid) { if(plantedC4[playerid] != 1) return SendClientMessage(playerid, COLOR_RED,"ERROR: You Have To Plant C4 To Detonate it!"); //if the player didn't plant a C4 send him an error msg new Float:x,Float:y,Float:z; //This will be used to get the C4 object position plantedC4[playerid]--; //To Set The plantedC4 of playerid 0 GetObjectPos(C4Object[playerid], x, y, z); //To Get the C4 object position CreateExplosion(x,y,z,2,50.0); //to create explosion in C4 position DestroyObject(C4Object[playerid]); //to destroy C4 object SendClientMessage(playerid, COLOR_BLUE,"C4 Has Been Detonated!"); //Send player msg that he successfully detonated the C4 return 1; }