Sign in to follow this  
David_Sibirkin

Как сменить виртуальный мир ?

Recommended Posts

Weizik    1
"setdimension": (player, args) =>
	{
		let id = parseInt(args[1]);
		
		if(global.dimensions[id]
			&& global.dimensions[id] > 63)
		{
			player.outputChatBox("Dimension is full");
		}
		else
		{
			if(global.dimensions[id])
			{
				global.dimensions[id]++;
				global.dimensions[player.dimension]--;
				player.dimension = id;
				player.outputChatBox("You have set your dimension!");
			}
			else
			{
				global.dimensions[id] = 1;
				global.dimensions[player.dimension]--;
				player.dimension = id;
				player.outputChatBox("You have set your dimension!");
			}
		}
		
	},

Кусок кода с исходника. Попробуй сам разобраться.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.