Jump to content

Arenas with setElementDimension


Sex*

Recommended Posts

Tried it...now when I press F1(bindkey) then it already starts falling.

Also it gave me error at 76 line:

setElementDimension ( source, 0 ) 

Tried to change this to this:

setElementDimension ( localPlayer, 0 ) 

But didnt work.

Edited by Guest
Link to comment

Tried it...now when I press F1(bindkey) then it already starts falling.

Also it gave me error at 76 line:

setElementDimension ( source, 0 ) 

Tried to change this to this:

setElementDimension ( localPlayer, 0 ) 

But didnt work.

Link to comment

Well:

setElementDimension ( localPlayer, 0 ) 

function getUserMouseSelection() 
    if opened == false then return end 
    if isCursorShowing() == false then return 0 end 
    local posX,posY = getCursorPosition() 
    local mouseX, mouseY = posX * screenWidth, posY * screenHeight 
    if (mouseX >= locA) and (mouseX < locB) and (mouseY < locHeightB) and (mouseY >= locHeight) then 
        if not (selectedMenu == 1) then 
setElementDimension ( localPlayer, 1 ) 
outputChatBox ( tostring ( getElementDimension ( localPlayer ) ) ) 
setElementData (localPlayer,"gamemode","[gamemodes]/[race]/race", true) 
            selectedMenu = 1 
            selectedImg(6) 
            resetImg(1, true) 
            resetImg(2, true) 
            resetImg(3, true) 
            resetImg(4, true) 
            resetImg(5, true) 
        end 
    elseif (mouseX >= locB) and (mouseX < locC) and (mouseY <= locHeightB) and (mouseY >= locHeight) then 
        if not (selectedMenu == 2) then 
setElementDimension ( localPlayer, 2 ) 
outputChatBox ( tostring ( getElementDimension ( localPlayer ) ) ) 
setElementData (localPlayer,"gamemode","[gamemodes]/[raceDD]/race", true) 
            selectedMenu = 2 
            selectedImg(5) 
            resetImg(1, true) 
            resetImg(2, true) 
            resetImg(3, true) 
            resetImg(4, true) 
            resetImg(6, true) 
        end 

function checkDxMenuSelection(button,state) 
    if opened == false then return end 
    if (button == "left") and (state == "down") then 
        if selectedMenu ~= 0 then 
             setElementDimension ( localPlayer, selectedMenu ) 
        end 
    end 
end 

Isnt something wrong with something else? Because I cant run race and raceDD both...and it always stops raceDD and starts race...

Link to comment

reet-triple-facepalm.jpg

...

My way what I have done once for a multi gamemode.

>Read the meta of the file for the .map file and .lua files.

>Read the .map file as an XML, load all the object positions in a table.

>Loop trough the table and create the objects

>Create your costum race (mapname, countdown)

For scripts:

>Load the scripts on the client side with loadstring

>Make wrappers for unloading

>Profit

Good luck!

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