Jump to content

How to create multi worlds server


RenanPG

Recommended Posts

I DID THIS, BUT DON'T WORKED

function setWorld( leaf ) 
    server.setElementDimension( g_Me, leaf.dimension ) 
    local vehicle = getPedOccupiedVehicle( g_Me ) 
    if vehicle then 
        server.setElementDimension( vehicle, leaf.dimension ) 
        --This will set the dimension for everyone in the vehicle. 
        --[[for i=0,getVehicleMaxPassengers( vehicle ) do 
            local player = getVehicleOccupant( vehicle, i ) 
            if player and player ~= g_Me then 
                server.setElementDimension( player, leaf.dimension ) 
            end 
        end]] 
    end 
    setPlayerPosition( leaf.posX, leaf.posY, leaf.posZ + 1 ) 
    setFarClipDistance( leaf.farclip ) 
    closeWindow( wndSetWorld ) 
end 
  
wndSetWorld = { 
    'wnd', 
    text = 'Set World', 
    width = 250, 
    controls = { 
        { 
            'lst', 
            id = 'world', 
            width = 230, 
            height = 300, 
            columns = { 
                { text = 'Multi Worlds', attr = 'name' } 
            }, rows = { xml = 'worlds.xml', attrs = { 'name', 'posX', 'posY', 'posZ', 'farclip', 'dimension' } }, 
            onitemdoubleclick = setWorld 
        }, 
        {'btn', id='close', closeswindow=true} 
    } 
} 

type="world"> 
    "Freeroam" posX="0" posY="0" posZ="0" farclip="0" dimension="0"/> 
    "Deathmatch" posX="0" posY="0" posZ="0" farclip="0" dimension="1"/> 
    "Zombies" posX="0" posY="0" posZ="0" farclip="0" dimension="2"/> 

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