Object codes
#1

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
Reply
#2

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);
EDIT:

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));
Reply
#3

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

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

Quote:
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.
Reply
#6

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)