[Tutorial] C4 System - Using Zcmd
#16

Quote:
Originally Posted by Misterenas
View Post
When it should explode?
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;
}
Reply


Messages In This Thread
C4 System - Using Zcmd - by adrianlouise - 12.05.2017, 16:12
Re: C4 System - Using Zcmd - by Hunud - 12.05.2017, 17:36
Re: C4 System - Using Zcmd - by adrianlouise - 12.05.2017, 17:46
Re: C4 System - Using Zcmd - by Nakul - 12.05.2017, 18:16
Re: C4 System - Using Zcmd - by youssef2016 - 12.05.2017, 18:42
Re: C4 System - Using Zcmd - by JustMe.77 - 12.05.2017, 19:16
Re: C4 System - Using Zcmd - by adrianlouise - 12.05.2017, 19:16
Re: C4 System - Using Zcmd - by Vince - 12.05.2017, 19:54
Re: C4 System - Using Zcmd - by adrianlouise - 12.05.2017, 19:58
Re: C4 System - Using Zcmd - by Hansrutger - 13.05.2017, 00:03
Re: C4 System - Using Zcmd - by adrianlouise - 13.05.2017, 10:54
Re: C4 System - Using Zcmd - by SyS - 13.05.2017, 11:29
Re: C4 System - Using Zcmd - by adrianlouise - 13.05.2017, 13:33
Re: C4 System - Using Zcmd - by Bolex_ - 13.05.2017, 17:10
Re: C4 System - Using Zcmd - by Misterenas - 13.05.2017, 19:53
Re: C4 System - Using Zcmd - by adrianlouise - 13.05.2017, 19:55

Forum Jump:


Users browsing this thread: 4 Guest(s)