Jump to content

[Segítsetek]Toggle Warp


Recommended Posts

Szeretnék egy olyan 'cuccot' betenni freeroam-ba, ami offolja vagy épp bekapcsolja a Warpot.

Itt már van egy 'script kód':

function warpTo(leaf) 
    if not leaf then 
        leaf = getSelectedGridListLeaf(wndWarp, 'playerlist') 
        if not leaf then 
            return 
        end 
    end 
    local player = getPlayerFromNick(leaf.name) 
    if player then 
        if getElementData(player,"warp.status") then outputChatBox ( "This player has disabled warping.", player, 255, 0, 0 ) return end -- added 
        server.warpMe(player) 
    end 
    closeWindow(wndWarp) 
end 
  
  
function warpToCommand(cmd, player) 
    if player then 
        player = getPlayerFromNick(player) 
        if player then 
            if getElementData(player,"warp.status") then outputChatBox ( "This player has disabled warping.", player, 255, 0, 0 ) return end --added 
            server.warpMe(player) 
        end 
    else 
        createWindow(wndWarp) 
        showCursor(true) 
    end 
end 
  
addCommandHandler('warpto', warpToCommand) 
addCommandHandler('wt', warpToCommand) 

Csak az a gond ezzel, hogy ide nem tudom beírni úgy hogy működjön is:

{'chk', id='jetpack', onclick=toggleJetPack},

{'chk', id='falloff', text='Fall of Bike', onclick=toggleFallOffBike},

{'chk', id='warp.status', text='Warp', onclick=warpMe, width=80},

Már mindenféle variációt próbáltam, de semmi.. Vagy a 'script kód' se jó?

Köszi előre is a válaszokat! :D

Link to comment
  • 1 month later...

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