17.01.2011, 20:35
How can I Get players to only see objects in virtual world?
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0);
SetPlayerVirtualWorld(playerid, worldid);
pawn Код:
then pawn Код:
|
//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; }