GetPlayerVirtualWorld - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GetPlayerVirtualWorld (
/showthread.php?tid=270527)
GetPlayerVirtualWorld -
park4bmx - 20.07.2011
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
![undecided](images/smilies/neutral.gif)
if anyone can help out would be grate TNX
Re: GetPlayerVirtualWorld -
Grim_ - 20.07.2011
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.
Re: GetPlayerVirtualWorld -
park4bmx - 20.07.2011
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