SA-MP Forums Archive
Create dynamic object for player. - 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: Create dynamic object for player. (/showthread.php?tid=498671)



Create dynamic object for player. - audriuxxx - 04.03.2014

Hi,

When i createdynamicobject for playerid, can i destroy that object when player disconnect? i write it to variable

Код:
PlayerObjectD[ playerid ] = CreateDynamicObject( x,y ......, playerid );
OnPlayerDisconnect

Код:
DestroyDynamicObject(  PlayerObjectD[ playerid ] );



Re: Create dynamic object for player. - JR_Junior - 04.03.2014

Yes, you can!


Re: Create dynamic object for player. - MattGregory - 04.03.2014

You don't need to.


Re: Create dynamic object for player. - JR_Junior - 04.03.2014

Quote:
Originally Posted by MattGregory
Посмотреть сообщение
You don't need to.
Really, but is important to prevent bugs or crasches in the server, because if a player create an object and disconect the object still created.