Jump to content

Dimensional System [ HELP CODE ]!


xScatta

Recommended Posts

dimension = 0 
names = { } 
  
function worldc ( playerSource, _, name ) 
    dimension = ( dimension + 1 ) 
    setElementDimension ( playerSource, dimension ) 
    names [ name ] = dimension 
    --setElementData(names[name],name,dimensions[dimension]) 
    outputChatBox ( "#00FF00*You has successfully created world named ".. name .."!", playerSource, 0, 0, 0, true ) 
end 
  
function worldj ( player, _, name ) 
    if names [ name ] then 
        setElementDimension ( player, names [ name ] ) 
        outputChatBox ( "#00FF00*You has moved to world ".. name .."!", player, 0, 0, 0, true ) 
    else 
        outputChatBox ( "#00FF00*That world doesn't exist!", player, 0, 0, 0, true ) 
    end 
end 
  
function worlde ( playerx ) 
    setElementDimension ( playerx, 0 ) 
    outputChatBox ( "#00FF00*You has exited the world!", playerx, 0, 0, 0, true ) 
end 
  
addCommandHandler ( "createworld", worldc ) 
addCommandHandler ( "joinworld", worldj ) 
addCommandHandler ( "exitworld", worlde ) 

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...