SA-MP Forums Archive
CreateDynamicObject and CreateVehicle - 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: CreateDynamicObject and CreateVehicle (/showthread.php?tid=508523)



CreateDynamicObject and CreateVehicle - Mauricee - 22.04.2014

Why sometimes, after I create a vehicle with CreateVehicle, the vehicle spawns under my object (created with CreateDynamicObject) ... The vehicle doesn't recieve the object fast enough, or what? ... I think the vehicle have "lag" and sometimes spawns udner ... any solutions?


Re: CreateDynamicObject and CreateVehicle - CroM256 - 22.04.2014

Try to set Z coordinate +1 or +2 on vehicles, If there is not huge lagg, it will help.


Re : CreateDynamicObject and CreateVehicle - Ramoboss - 22.04.2014

i'll explain :

CreateDynamicObject is for streamer,
when you use it, it's not like CreateObject, it's create the object slower than CreateObject, so there is a laps of time (1-2 seconds) to spawn,
CreateVehicle spawn your vehicle instantenly, so the MAP spend MORE time to Spawn than the VEHICLE


Re: CreateDynamicObject and CreateVehicle - Stanford - 22.04.2014

I suggest setting the floor only in the map as CreateObject and the rest is CreateDynamicObject, and it will do the job I guess.


Re : CreateDynamicObject and CreateVehicle - Ramoboss - 22.04.2014

yeah, but it's longer than putting vйhicles Z position +2 , he have to search the floor object x)


Re: CreateDynamicObject and CreateVehicle - CroM256 - 22.04.2014

I don't think so you can use both. As I remember you can use just CreateObject or just CreateDynamicObject, but maybe I am wrong.


Re: CreateDynamicObject and CreateVehicle - Mauricee - 22.04.2014

Any official answer from SA-MP Team please ? ... I want more explications


Re : CreateDynamicObject and CreateVehicle - Ramoboss - 22.04.2014

Look,
you can use both CreateObject and CreateDynamicObject,
for the floors, i suggest to use CreateObject,
and you can CreateDynamicObject for other objects,

SA:MP Team does not answer to this posts,
We gave you all the explications that you need


Re: Re : CreateDynamicObject and CreateVehicle - doreto - 22.04.2014

Quote:
Originally Posted by Ramoboss
Посмотреть сообщение
Look,
you can use both CreateObject and CreateDynamicObject,
for the floors, i suggest to use CreateObject,
and you can CreateDynamicObject for other objects,

SA:MP Team does not answer to this posts,
We gave you all the explications that you need
If you are using streamer DON'T EVER use CreateObject.Streamer use CreateObject to create objects and destroy them, but if you limit his resource (aka createobject) you will get bad small range of loaded objects.

OT: as above suggested put vehicle Z + 1-3 above object.


Re: CreateDynamicObject and CreateVehicle - Konstantinos - 22.04.2014

When you create a vehicle, the server knows the Z (height) already so set it a bit higher as suggested above. It's like when teleporting with vehicle and the ground's object has been created with the streamer plugin, you fall under it. The function Streamer_UpdateEx is useful for that kind of situations.

Quote:
Originally Posted by doreto
Посмотреть сообщение
Streamer use CreateObject to create objects and destroy them
Streamer uses CreatePlayerObject function.