Objects in virtual world
#1

Hi! I need help with some problem with objects in virtal world.

I have made this object and put it in virtual world 17
Код:
OBJECT 1  CreateDynamicObject(978, -2082.315918, -136.974884, 35.160534, 0.0000, 0.0000, 89.1267,17);
And I made this command
Код:
CMD:stunts(playerid)
{
SetPlayerVirtualWorld(playerid,17);
SetPlayerPos......
return 1;
}
And I made this object in virtual world 0
Код:
OBJECT 2  CreateDynamicObject(978, -2082.315918, -136.974884, 35.160534, 0.0000, 0.0000, 89.1267,0);
But If I teleport to object 1 (stunts) why does it show me the object 2?

Please how to make that object 2 won't be shown in virtual world 0

I made teleport to object 2 with
Код:
SetPlayerVirtualWorld(playerid,0);


I don't get it what's wrong?

I use streamer anyway!
Reply
#2

it's normaly .. an Object in diferent World ID you'll not see ..

try doing them in the same World .. or do 2 commands each one with an object (with it own Virtual World )
Reply
#3

What pls answer on my question how to.....
Reply
#4

I believe this is what you're looking for.

Got it from WIKI.

One thing SA:MP doesn't provide by default is support for objects only appearing in certain virtual worlds, this is achieved in YSI with:
Код:
CreateVWDynamicObject(world, model, x, y, z, rx, ry, rz);

EDIT:

Or "worldid = ..."

Код:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0);
Reply
#5

try this
pawn Код:
Object 1 :
CreateDynamicObject(978, -2082.315918, -136.974884, 35.160534, 0.0000, 0.0000, 89.1267, .worldid = 17);
pawn Код:
Object 2 :
CreateDynamicObject(978, -2082.315918, -136.974884, 35.160534, 0.0000, 0.0000, 89.1267, .worldid = 0);
Reply
#6

Nope it doesnt work do I need to give . before worldid?
Reply
#7

^ yes =.=

btw, why you create same object in same position ?
Reply
#8

I gived just a sentance
Reply
#9

It only works with CreatePlayerObject.

https://sampwiki.blast.hk/wiki/CreatePlayerObject
Reply
#10

No that works .worldid = *** thanks rickisme
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)