Object codes

Does createdynamicobject code use different object ids to createobject cause if I have create object for my /siren command it spawns the right object but you have to mess around to get it to work then when I add dynamic into the code it spawns a different object

CreateDynamicObject is a command from a plugin called "streamer" and no it uses the same object ids but as you said you can mess around with objects made by CreateDynamicObject...

Use this:

CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0);

To add siren to a vehicle you must do it in CreateVehicle!
Just instead of this:
CreateVehicle(modelid, x, y, z, Angle, color 1, color 2, respawn delay);
Use this:

CreateVehicle(modelid, x, y, z, Angle, color 1, color 2, respawn delay, siren(add siren = 1, no siren = 0));

So in my create vehicle stock I need to add the siren part onto it? And when I do that I get undefined symbol for "siren" and "no"

What kind of siren are you adding? If you mean like siren from police then just add 1 at the end as I said...

Originally Posted by andrejc999
Посмотреть сообщение
and no it uses the same object ids
If you are not referring to the object model ID, then it does not.

@CSLangdale: In 0.3.7 a parameter 'addsiren' was added in CreateVehicle function. Set it to 1 to enable the siren.

When I put a one in the stock it complains at me for it says number of arguments doesn't match definition?

Keep that parameter last and set it by default to 0. When a siren should be added, set the parameter (when calling the function) to 1 and use that parameter in CreateVehicle.

Forum Jump:

Users browsing this thread: 1 Guest(s)