Help With objects and virtual world! -
Elmerz_com - 17.01.2011
How can I Get players to only see objects in virtual world?
Re: Help With objects and virtual world! - [L3th4l] - 17.01.2011
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);
Set a worldid;
then
pawn Код:
SetPlayerVirtualWorld(playerid, worldid);
Re: Help With objects and virtual world! -
Ruffles. - 17.01.2011
Find the id of the int that you want, copy down the pawn code and set the virtual world (I think the first number) to the interior id.
Re: Help With objects and virtual world! -
Elmerz_com - 17.01.2011
Thanks!
Re: Help With objects and virtual world! -
Niko_boy - 26.01.2011
Quote:
Originally Posted by [L3th4l]
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);
Set a worldid;
then
pawn Код:
SetPlayerVirtualWorld(playerid, worldid);
|
i have a script with virtual world
but objects are still visible in original world
i want that objects must be visible only in virtual world
Re: Help With objects and virtual world! -
Niko_boy - 26.01.2011
the object must appear only when the player do teleport command (eg /stunt... the stunt area object must be appaear only when player do thge command no in normal gamemode)
Re: Help With objects and virtual world! -
iggy1 - 26.01.2011
https://sampwiki.blast.hk/wiki/CreatePlayerObject
That function will create an object for a player wherever he is (interiors and virtual worlds). w/o the need of a streamer. Although if you are using more than 400 objects you should
definitely use a streamer.
Re: Help With objects and virtual world! -
Niko_boy - 27.01.2011
i need a demo script
Re: Help With objects and virtual world! -
Tricks - 08.07.2012
****** finds this so I put an example script:
Код:
//Example with 5 objects in a VirtualWorld
CreateDynamicObject(18256,-317.30000000,-0.30000000,1.08000000,3.00000000,35.00000000,-12.00000000,1);
CreateDynamicObject(18256,-346.25000000,8.09000000,29.40000000,3.00000000,61.00000000,-12.00000000,1);
CreateDynamicObject(18256,-376.36000000,17.01000000,32.43000000,0.00000000,-47.00000000,-12.00000000,1);
CreateDynamicObject(18256,-383.28000000,19.28000000,32.62000000,2.00000000,-30.00000000,-12.00000000,1);
CreateDynamicObject(18256,-399.35000000,23.70000000,25.08000000,0.00000000,-20.00000000,-12.00000000,1);
//Example of teleport with setting a VirtualWorld which in this case is 1
if (strcmp("/stunt",cmdtext,true, 6) == 0)
{
SetPlayerPos(playerid,-399.35000000,23.70000000,26.00000000);
SendClientMessage(playerid,COLOR_GREEN,"Welcome to stunt");
GivePlayerWeapon(playerid,46,1);
GameTextForPlayer(playerid,"Welcome to stunt",3500,6);
SetPlayerVirtualWorld(playerid, 1);
return 1;
}
Peace