SetObjectWorld -
Kevin_Joshen - 03.08.2010
Does anyone know if there is a function like "SetObjectWorld" where i can set and objects world?
I am trying to make 2 different gamemodes in one, but I am wondering also if I can make certain commands work in certain worlds.
Examples;
like if i do /ar 2 it will arrest 2 if he is in world 43 (CnR world)
and if someone does /kill they will die if they are in world 1 (stunt)
Thanks!
-Kevin
Re: SetObjectWorld -
iggy1 - 03.08.2010
You should realy check out
Incognitos streamer<<<<<--Click
It has interior and vw setting on the CreateDynamicObject. Not sure if pawno has this function sorry.
Re: SetObjectWorld -
Mauzen - 03.08.2010
The only "native" possibility id know is, to use playerobjects, and to create them only for players in the wanted world. But I would guess thats the way the streamer does it, so i wouldnt recommend scripting it yourself
Re: SetObjectWorld -
Kevin_Joshen - 03.08.2010
Quote:
Originally Posted by iggy1
You should realy check out Incognitos streamer<<<<<--Click
It has interior and vw setting on the CreateDynamicObject. Not sure if pawno has this function sorry.
|
i am using that streamer =D
but i just don'w know how to do it. XD do you (or anyone else) know how to do it?
Re: SetObjectWorld -
PotH3Ad - 03.08.2010
pawn Код:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0);
Example:
//This will create an object in virtual world 10
CreateDynamicObject(1225, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10, -1, -1, 200.0);
And for the commands you can check if the player is in a certain virtual world:
pawn Код:
if(!strcmp(cmdtext, "/kill", true, 5))
{
if(GetPlayerVirtualWorld(playerid) != 1) return SendClientMessage(playerid, 0xAFFFFAF, "ERROR: You are not in the Stunt virtual world");
SetPlayerHealth(playerid, 0);
return 1;
}
Re: SetObjectWorld -
Kevin_Joshen - 04.08.2010
here's an example of one of my objects....
Код:
//object(barrel4) (4)
CreateDynamicObject(1225,-800.09747314,3559.79174805,182.39744568,0.00000000,0.00000000,0.00000000);
So it would be:
Код:
//object(barrel4) (4)
CreateDynamicObject(1225,-800.09747314,3559.79174805,182.39744568,0.00000000,10,0.00000000);
Is that right?
Re: SetObjectWorld -
PotH3Ad - 04.08.2010
Hmm I don't think that would work, this will work though...
pawn Код:
CreateDynamicObject(1225, -800.09747314, 3559.79174805, 182.39744568, 0.0, 0.0, 0.0, 10, -1, -1, 100);
The parameters are:
//ModelID, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid, interiorid, playerid, drawdistance