SetPlayerVirtualWorld...
#1

Hello!

What script sets players vacant virtual world?

Example:

Player named "Dumbass" entered the server and took virtual world number 1. Other player came to server and want to take vacant virtual world, so not the virtual world with number 1. So what script makes that?
Reply
#2

You want to set a virtual world for every connecting player so that every player who joins is in a different virtual world than the other?
Reply
#3

Yeah
Reply
#4

Put this in public OnPlayerConnect or in OnPlayerLogin or in OnPlayerSpawn :P
SetPlayerVirtualWorld(playerid, playerid);
VW will same as players id...
Reply
#5

So Virtual World limit is Unlimited?
Reply
#6

No, you can create 2,147,483,647 Virtual Worlds Almost unlimited
Reply
#7

Oh... Thanks mate! Respect
Reply
#8

SetPlayerVirtualWorld(playerid, playerid);

Puts the player in the world of their ID.


EDIT: Sigh.
Reply
#9

pawn Code:
// Top of the script
new PlayerWorld;

// Under OnGameModeInit
PlayerWorld = 0;

// Under OnPlayerConnect
PlayerWorld++;

// Under OnPlayerDisconnect
PlayerWorld--;

// Under OnPlayerSpawn
SetPlayerVirtualWorld(playerid, PlayerWorld);
Try this, untested.
Basically the same as MP2 said, I was making it while he posted it.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)