Why object don't destroy? DestroyDynamicObject -
R3SpaWn0 - 03.08.2018
Hi, i have a script and it almost works... the object is created in game but when i call it with cmd its not destroying..
i read about add DestroyPlayerObject(playerid, objectid); but i dont want to use playerid id becouse i want to remove object for all players? what its the problem guys? :S
PHP Code:
//The Object Create is working
GetPlayerPos(playerid,x,y,z);
CreateDynamicObject(Object2,x,y,z,0,0,0);
PHP Code:
When i call it from CMD no..
Delete3DTextLabel(Text2);
DestroyDynamicObject(Object2);
Re: Why object don't destroy? DestroyDynamicObject -
David (Sabljak) - 03.08.2018
Define that object, put on top
PHP Code:
new object;
object = CreateDynamicObject(ID OF OBJECT,x,y,z,0,0,0); //on create to define "object"
DestroyDynamicObject(object); //destroying defined "object"
Re: Why object don't destroy? DestroyDynamicObject -
DBZdabIt3Bro7 - 03.08.2018
By what I understand from your small little snippet, you're trying to destroy an object by the variable Object2, however, you're creating an object with the model Object2... seems to me you're entering a model ID instead of object ID.
edit: awww, daniel was a second quicker than me ;(
Re: Why object don't destroy? DestroyDynamicObject -
David (Sabljak) - 03.08.2018
Quote:
Originally Posted by DBZdabIt3Bro7
By what I understand from your small little snippet, you're trying to destroy an object by the variable Object2, however, you're creating an object with the model Object2... seems to me you're entering a model ID instead of object ID.
edit: awww, daniel was a second quicker than me ;(
|
maybe he has somewhere defined Object2 as some ID of object yes...
who is daniel?
Re: Why object don't destroy? DestroyDynamicObject -
DBZdabIt3Bro7 - 03.08.2018
Quote:
Originally Posted by David (Sabljak)
maybe he has somewhere defined Object2 as some ID of object yes...
who is daniel?
|
this is daniel
Re: Why object don't destroy? DestroyDynamicObject -
R3SpaWn0 - 03.08.2018
Quote:
Originally Posted by DBZdabIt3Bro7
this is daniel
|
I can't define the object to create on gamemode init, the object have to create when a player die!!
Then i when i cmd, the object has to destroy, now you understand me? :S
Re: Why object don't destroy? DestroyDynamicObject -
DBZdabIt3Bro7 - 03.08.2018
Quote:
Originally Posted by R3SpaWn0
I can't define the object to create on gamemode init, the object have to create when a player die!!
Then i when i cmd, the object has to destroy, now you understand me? :S
|
not at all. not even close.
Re: Why object don't destroy? DestroyDynamicObject -
Sew_Sumi - 03.08.2018
I'm pretty sure you're going to have trouble if you can't actually take note of the advice you are being given.
Use an array, you're just chopping and changing in the vain effort to FLUKE a fix.
Re: Why object don't destroy? DestroyDynamicObject -
R3SpaWn0 - 03.08.2018
Quote:
Originally Posted by Sew_Sumi
I'm pretty sure you're going to have trouble if you can't actually take note of the advice you are being given.
Use an array, you're just chopping and changing in the vain effort to FLUKE a fix.
|
Lol,i have all day scripting thinks.. i scripted job , job commands and faction, i know to use a little bit good variables and if/else, the problem is this that i dont know, i m asking what i should use array? i will figure it out..
Re: Why object don't destroy? DestroyDynamicObject -
Sew_Sumi - 03.08.2018
Hold on, what?
You say you've scripted a job and faction, yet don't know to use a variable to track something?