SA-MP Forums Archive
is there any way to change CreateObject's world and interior? - 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: is there any way to change CreateObject's world and interior? (/showthread.php?tid=494704)



is there any way to change CreateObject's world and interior? - newbienoob - 14.02.2014

.. without using streamer?


Re: is there any way to change CreateObject's world and interior? - CuervO - 14.02.2014

Not really using the default CreateObject

https://sampwiki.blast.hk/wiki/CreateObject


You could use a timer and use CreatePlayerObject to create the objects if the player is in the interior/world you want, but that's basically what the Streamer does.


Re: is there any way to change CreateObject's world and interior? - newbienoob - 14.02.2014

CreatePlayerObject creates an object in world/interior that player currently in?


Re: is there any way to change CreateObject's world and interior? - Konstantinos - 14.02.2014

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
CreatePlayerObject creates an object in world/interior that player currently in?
It's shown to every world and interior, streamer just allows you to use specific worldid and/or interiorid which is recommended to be used.


Re: is there any way to change CreateObject's world and interior? - CuervO - 14.02.2014

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
CreatePlayerObject creates an object in world/interior that player currently in?
No, it creates an object only visible by the player it is created for, therefor you can create the object and show it only to that player while he's in the interior/world you want and destroy it when the player is no longer at that interior - again, that's what the streamer does.


Re: is there any way to change CreateObject's world and interior? - ColeMiner - 14.02.2014

It can be done without using the streamer, but to do so you would have to replicate the features of the streamer already mentioned here. You could use a timer, or you could hook the relevant functions and callbacks that control interiors and worlds to update the object's visibility as the player moves about.