Getting the virtual world of dynamic objects - 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: Getting the virtual world of dynamic objects (
/showthread.php?tid=490637)
Getting the virtual world of dynamic objects -
Shoulen - 27.01.2014
Hi there,
I'm using Incognito's streamer.
Is there any way for me to get the virtual world of a dynamic object?
I've been trying to figure it out for ages but I can't seem to, I know that the dynamic object will change IDs but that's not the problem. I have several objects in different virtual worlds and I am wanting to run a loop through all the objects in the virtual world.
Thanks in advance.
Re: Getting the virtual world of dynamic objects -
Konstantinos - 27.01.2014
That may work.
pawn Код:
new obj_vw = Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_WORLD_ID);
Re: Getting the virtual world of dynamic objects -
Shoulen - 27.01.2014
In terms of getting the objectid, how would I go about specifying that?
I have run an example with the current ID of a streamed dynamic object but it tells me
Код:
*** Streamer_GetIntData: Invalid data specified
Why would it do that?
Re: Getting the virtual world of dynamic objects -
Konstantinos - 27.01.2014
You would use it in a loop, checking if it was a valid object and using the variable from the loop as objectid.
However, it seems that it does not support world id in Streamer_GetIntData. Other than that, the most common way would be an array to store the virtual world of each object unless there's another way (I doubt).
Re: Getting the virtual world of dynamic objects -
Shoulen - 27.01.2014
I was afraid I'd have to store each object.
Thanks for your help though, it's much appreciated, I've given you some rep.