[HELP]Virtual worlds (About pen, i think its better post here than a old topic)
#1

since yesterday I am working on "adding virtual worlds" on gamemode PEN ... All is well when we do / enter (defines the virtual world correct) or do / exit (defines the virtual world 0) that is good, but the problem is when we die or go directly to the server and spawn inside of the house, that don't defines the virtual world right, and when we do / exit to the house that we have the virtual world 0

What i have to do?
Reply
#2

pawn Код:
new vworld[MAX_PLAYERS] = 0;
//In your command

vworld[playerid] = strval(params); // This one, when you are using dcmd
SetPlayerVirtualWorld(playerid, vworld[playerid]);

//OnPlayerSpawn
SetPlayerVirtualWorld(playerid, vworld[playerid]);
I'm not sure, but try
Reply
#3

pawn Код:
vworld[playerid] = strval(params); // This one, when you are using dcmd
SetPlayerVirtualWorld(playerid, vworld[playerid]);
Were i put this?
Reply
#4

Quote:
Originally Posted by jonybomb
since yesterday I am working on "adding virtual worlds" on gamemode PEN ... All is well when we do / enter (defines the virtual world correct) or do / exit (defines the virtual world 0) that is good, but the problem is when we die or go directly to the server and spawn inside of the house, that don't defines the virtual world right, and when we do / exit to the house that we have the virtual world 0

What i have to do?
Look at OnPlayerSpawn for house spawning and add the correct virtual world, i'm not sure but it should be something like this:
pawn Код:
SetPlayerVirtualWorld(playerid, HouseInfo[houseid][VirtualWorldID]
Reply
#5

Quote:
Originally Posted by jonybomb
pawn Код:
vworld[playerid] = strval(params); // This one, when you are using dcmd
SetPlayerVirtualWorld(playerid, vworld[playerid]);
Were i put this?
ups, I haven't read your post carefully. In your /enter comand do
pawn Код:
vworld[playerid] = VIRTUALWORLD;
SetPlayerVirtualWorld(playerid, vworld[playerid]);
Reply
#6

Quote:
Originally Posted by Scott[LT
]
Quote:
Originally Posted by jonybomb
pawn Код:
vworld[playerid] = strval(params); // This one, when you are using dcmd
SetPlayerVirtualWorld(playerid, vworld[playerid]);
Were i put this?
ups, I haven't read your post carefully. In your /enter comand do
pawn Код:
vworld[playerid] = VIRTUALWORLD;
SetPlayerVirtualWorld(playerid, vworld[playerid]);
But /enter works fine, its only when we die/enter in server, and spawn directly inside house, we make /exit and we go to another house lol



Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by jonybomb
since yesterday I am working on "adding virtual worlds" on gamemode PEN ... All is well when we do / enter (defines the virtual world correct) or do / exit (defines the virtual world 0) that is good, but the problem is when we die or go directly to the server and spawn inside of the house, that don't defines the virtual world right, and when we do / exit to the house that we have the virtual world 0

What i have to do?
Look at OnPlayerSpawn for house spawning and add the correct virtual world, i'm not sure but it should be something like this:
pawn Код:
SetPlayerVirtualWorld(playerid, HouseInfo[houseid][VirtualWorldID]
i have this
Quote:

error 032: array index out of bounds (variable "HouseInfo")
error 017: undefined symbol "VirtualWorldID"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Reply
#7

Sorry double post, i contact moe, and he said me that:

Quote:

AH yes you're right I forgot all about that.

You'll have to make a check under public SetPlayerRandomSpawn, find:

if(house !=255)

Under this, find this line:

PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];

Under that line, put this:

SetPlayerVirtualWorld(playerid,HouseInfo[playerid][hWorld]);

And that should fix it.

I gonna test it now
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)