GetPlayerVirtualWorld
#1

i want to check if Any player in the server is in Example VirtualWorld 1
So there is anyone in VirtualWorld 1

Then the other player is put in VirtualWorld 2
im not sure how to do that :X

pawn Код:
//what i got is This (But Im Not Sure its Right)

//first i set the VirtualWorld to 2
//and from there it goes D:
SetPlayerVirtualWorld(playerid, 2);
        for(new AnyId; AnyId < MAX_PLAYERS; AnyId ++)
        {
        if(GetPlayerVirtualWorld(AnyId)>=2)
            {
            new VirtualWorld = GetPlayerVirtualWorld(AnyId);
            SetPlayerVirtualWorld(playerid,VirtualWorld++);
            }
        }
Im Not Sure if it would work because i cant test the code
if anyone can help out would be grate TNX
Reply
#2

There is a much simpler way to doing this, just set the player's virtual world to their ID + 1.
pawn Код:
SetPlayerVirtualWorld( playerid, playerid + 1 );
You add the +1 incase the player has the ID of 0, removing them from the default world.
Reply
#3

Quote:
Originally Posted by Grim_
Посмотреть сообщение
There is a much simpler way to doing this, just set the player's virtual world to their ID + 1.
pawn Код:
SetPlayerVirtualWorld( playerid, playerid + 1 );
You add the +1 incase the player has the ID of 0, removing them from the default world.
Ok i see thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)