How to give ObjectID to a dynamicobject?
#1

Код:
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!
Reply
#2

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.
Reply
#3

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 ...
Reply
#4

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.
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)