Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Cool on May 30, 2016, 10:36 PM

Title: playerworld
Post by: Cool on May 30, 2016, 10:36 PM
i wtching in many server that player world in one server two world possible that i know but will its show one world players to another world players??
and how i can create two world please tell me in detail. :P
Title: Re: playerworld
Post by: Finch Real on May 31, 2016, 03:49 AM
Well If One player is in world 1 then he cannot see any other player present in world 2
Use of this system is very simple
Use This:
function onPlayerSpawn( player )
{
player.World = 2;
MessagePlayer( "w00t Ye Mang! i am in world 2", player );
}
Title: Re: playerworld
Post by: EK.IceFlake on May 31, 2016, 04:04 AM
Worlds already exist, more specifically, a few billion of them; more than you'll ever need.
To use them, you should use the int CPlayer.World property. For example
function onPlayerSpawn(player)
{
    if (player.Team == 1) player.World = 2;
    else player.World = 1;
    return 1;
}
This may be useful if the team 1 is on another gamemode, if anyone spawns with team ID 1 he will be put into world 2. Any other team and he stays in the default world; 1.