Object destroying
#1

Hi so i want to make command when i write it i create object and when i write it again it destroy it, i made that but i dont know how to make that object destroy
Code:
COMMAND:troll(playerid,params[])
{
	if( ADMIN[playerid] == 4 )
	{

	    if( GTMODE[ GetPlayerVehicleID( playerid ) ] == false )
	    {
	    	GTMODE[ GetPlayerVehicleID( playerid ) ] = true;
	    	SendClientMessage( playerid, COLOR_LIGHTBLUE,"Create.");
new objectOne, objectTwo;
			objectOne   = CreateObject(19327, 0, 0, 0, 0, 0, 0);
			objectTwo   = CreateObject(19327, 0, 0, 0, 0, 0, 0);
			AttachObjectToVehicle(objectOne, GetPlayerVehicleID( playerid ), -1.129999, -0.334999, 0.000000, -1.004999, 0.000000, -90.449951); //Object Model: 19327 |
			AttachObjectToVehicle(objectTwo, GetPlayerVehicleID( playerid ), 1.149999, -0.339999, 0.000000, 0.000000, 0.000000, 90.449951); //Object Model: 19327 |
			SetObjectMaterialText(objectOne, "Text", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 42, 1, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
			SetObjectMaterialText(objectTwo, "Text", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 42, 1, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
	    	return 1;
	    }
	    else
	    {
	        GTMODE[ GetPlayerVehicleID( playerid ) ] = false;
	        SendClientMessage( playerid, COLOR_RED,"Destroy");
	    }
	}
	return 1;
}
Reply


Messages In This Thread
Object destroying - by ignas1125 - 29.03.2014, 10:44
Re: Object destroying - by CLIT - 29.03.2014, 10:49
Re: Object destroying - by ignas1125 - 29.03.2014, 10:56
Re: Object destroying - by Carxi - 29.03.2014, 11:00
Re: Object destroying - by ignas1125 - 29.03.2014, 11:03
Re: Object destroying - by Carxi - 29.03.2014, 11:06
Re: Object destroying - by EiresJason - 29.03.2014, 11:11
Re: Object destroying - by ignas1125 - 29.03.2014, 11:11

Forum Jump:


Users browsing this thread: 2 Guest(s)