SA-MP Forums Archive
CreateDynamicObject disappear - 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 disappear (/showthread.php?tid=648646)



CreateDynamicObject disappear - DavidZvla - 26.01.2018

This is my problem..

I use the latest version of streamer ... but the objects created by functions or commands ... that is ... those that are not loaded by OnGamemodeInit.

for example .. I have a command to create an object in a certain area with CreateDynamicObject .. it is created .. but after a few seconds it is deleted and can not be observed anymore. It only happens to me with DynamicObjects created by functions or cmds. I can't find more information about this issue out there

maybe someone here can help me about this..


Re: CreateDynamicObject disappear - raydx - 26.01.2018

https://github.com/samp-incognito/sa...gin/issues/230

Try to go back to 2.8.2.


Re: CreateDynamicObject disappear - Kraeror - 26.01.2018

Check for DestroyDynamicObject function (if you are trying to destroy any dynamic object, that isn't valid it maybe destroys all of your dynamic object)


Re: CreateDynamicObject disappear - DavidZvla - 26.01.2018

Quote:
Originally Posted by Kraeror
Посмотреть сообщение
Check for DestroyDynamicObject function (if you are trying to destroy any dynamic object, that isn't valid it maybe destroys all of your dynamic object)
Do you recommend that i can use IsValidDynamicObject(objectid) before Destroy any dynamic object in my script?

Like..

Код:
if(IsValidDynamicObject(Object[playerid]))    {    DestroyDynamicObject(Object[playerid]);    }



Re: CreateDynamicObject disappear - jasperschellekens - 26.01.2018

Quote:
Originally Posted by DavidZvla
Посмотреть сообщение
Do you recommend that i can use IsValidDynamicObject(objectid) before Destroy any dynamic object in my script?

Like..

Код:
if(IsValidDynamicObject(Object[playerid]))    {    DestroyDynamicObject(Object[playerid]);    }
Just do as he told: "Check for DestroyDynamicObject function (if you are trying to destroy any dynamic object, that isn't valid it maybe destroys all of your dynamic object)"


Re: CreateDynamicObject disappear - DavidZvla - 29.01.2018

Solved


Re: CreateDynamicObject disappear - PepsiCola23 - 29.01.2018

atleast say how you solved it so other people can find the fix too