How to give ObjectID to a dynamicobject? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to give ObjectID to a dynamicobject? (
/showthread.php?tid=410600)
How to give ObjectID to a dynamicobject? -
qkac1234 - 26.01.2013
Код:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 300.0);
How do I add objectid?
Thanks!
Re: How to give ObjectID to a dynamicobject? -
Threshold - 26.01.2013
CreateDynamicObject, like CreateObject, returns the value of the objectid...
So let's say...
pawn Код:
new myobjectid;
myobjectid = CreateDynamicObject(...
myobjectid, will be the same value as the objectid.
Re: How to give ObjectID to a dynamicobject? -
qkac1234 - 26.01.2013
Can u help me one more thing? How do I delete a selected object? I tried myobject[100] and then a new variable o and myobject[o] but it isnt working ...
Re: How to give ObjectID to a dynamicobject? -
Threshold - 26.01.2013
I wouldn't use 100 as the array, I would be using MAX_OBJECTS, because the amount of objects can definitely reach higher than 100 at one time. So change myobject[100] to myobject[MAX_OBJECTS];, and if that doesn't work, feel free to post some of the code related to this problem, and I'll see if I can fix it.
Re: How to give ObjectID to a dynamicobject? -
qkac1234 - 26.01.2013
Okey... How do I add the first obecjt myobject[0] and the second myobject[1] and etc ...
Код:
new myobjectid[MAX_OBJECTS];
myobjectid[what here?] = CreateDynamicObject(...
I want to add models with one function, so I had to give them ID-s, other to all... I hope you understand what I want to tell u