Virtual world help
#1

Greetings, i need help i mapped someting and i want to place it ONLY in virtual world 1 and Interior 1 how can i do that i did it like this



Код:
public OnFilterScriptExit() {
    for(new i; i < MAX_PLAYERS; i++) {
	    if(GetPlayerVirtualWorld(i) != 1 || GetPlayerInterior(i) != 1) {
			TogglePlayerControllable(i, false);
		}
	}
}
But its still on Virtual word 0...
Reply
#2

Put Under onplayerconnect in Filescript or your gm

SetPlayerVirtualWorld(playerid, 1);
SetPlayerInterior(playerid, 1);
Reply
#3

what do you mean ?
Reply
#4

I made this under the filterscript


Код:
    for(new i, Float: fPlayerPos[3]; i < MAX_PLAYERS; i++) {
	    if(GetPlayerVirtualWorld(i) != 1 || GetPlayerInterior(i) != 1) {
			Streamer_UpdateEx(i, fPlayerPos[0], fPlayerPos[1], fPlayerPos[2]);
			GetPlayerPos(i, fPlayerPos[0], fPlayerPos[1], fPlayerPos[2]);
			SetPlayerPos(i, fPlayerPos[0], fPlayerPos[1], fPlayerPos[2] + 2.5);
			TogglePlayerControllable(i, true);
		}
	}
Reply
#5

Are you trying to make the map appear in virtual world 1? If yes, i guess that is not possible. Since the objects are global, it will appear in virtual world 0 even if you place it inside other world.
Reply
#6

It is possible to do that i know it can but i need to know what i need to change to i will only appear in Virtual World 1
Reply
#7

Ah, sorry for the wrong information above. Just realized you can do it with CreateDynamicObject using streamer plugin. The syntax to add the object is

Код:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 300.0);
So all you have to do is, change the worldid to the world you want same for the interior.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)