open.mp forum
[Pawn] I have a question - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] I have a question (/showthread.php?tid=2511)



I have a question - melissawimmer219 - 2023-12-08

Dear community,

i think the question is clear. I want to set my 'spawn-ojects' to a virtual world so that you just see the objects when you select your skin.


Thanks!


RE: I have a question - denNorske - 2023-12-08

In order to attach an object to a specific virtual world; you need to use an object streamer plugin.
The most familiar one is called "Incognitos Streamer Plugin"

Then when you create an object, you can set the virtual world you want it to render at by setting it in the CreateDynamicObject call;

PHP Code:
CreateDynamicObject(modelidFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rzworldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_OBJECT_SDFloat:drawdistance STREAMER_OBJECT_DDareaid = -1priority 0

By setting worldid to something else than -1. -1 means "all worlds", and a value 0 --> will link it to that worldid only.