SetPlayerVirtualWorld Question
#1

Hey guys well im coding a gangwars server and I have the LSPD in the gamemode, they can /want and /jail but problem is with Jail everyone spawns on the same virtual world and DM each other in the cell, So I enabled Invulrability to stop DM'ing but is there a way to stick them all on Virtual worlds and for it to detect if one of those worlds are occupied by a prisoner and putting them onto another world.

Thanks
Reply
#2

Just use a random..
pawn Код:
SetPlayerVirtualWorld(playerid,random(15000));
and if you want them free..
pawn Код:
SetPlayerVirtualWorl(playerid,0);
It will be hard for adding 2 players into one vw of 15000 worlds.
Reply
#3

Thank you very much I didnt even consider randomizing it. Thank you!
Reply
#4

Using random may still end up putting them in the same place, why not just put them in a number unique to their playerid? That also means less functions and more optimization, and for other sakes more predictability of which world they will be in, for example:

pawn Код:
SetPlayerVirtualWorld(playerid, 1000 + playerid);
So then player 0 will be in world 1000, player 50 will be in world 1050 and so on
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)