Jump to content

Dimension and gamemodes


Memory

Recommended Posts

Hello, I very interested in "multiple gamemodes" at server. Please, can you are explain me, how check dimension? For example, player join to server, write command /freeroam and setElementDimension set him to other dimension. But how perform checking in script of gamemode, if dimension == 1 then start map those who have in meta dimension 1, if dimension == 0 then maps with dimension 0. My reasoning are valid?

Link to comment

No, I know it. I mean checking: if dimension == 1 for all players in dimension 1 start map those who have in meta has dimension 1, if dimension == 0 then for all players in dimension 0 start maps with dimension 0

meta of any map

    ... 
    "***.map" dimension="0"/> 
    ... 

  

Link to comment
  • Moderators

maybe:

local dimension = getElementDimension(getElementsByType ("object")[1]) -- always objects are needed in the map 
  
  

local objects,dimension = getElementsByType ("object"),0 
if objects then 
    dimension = getElementDimension(objects[1])  
end 

But it would be better to make a setting in the edf and gamemode.

 

 

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...