Jump to content

[HELP ME] Why not working warp toggle?


Turbesz

Recommended Posts

i put this in fr_client.lua but doesn't working

--------------------------- 
-- Warp toggle 
------------------------- 
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) 

and

{'chk', id='warponoff', text='Warp', onclick=toggleWarpOnOff, width=50},

how to fix?:c

/sorry for my bad english/

Link to comment

Is this:

getSelectedGridListLeaf 

A self defined function (I'm guessing it is, because it doesn't exist on the wiki), if it is, please show the code to that here.

The fact that it's returning the function, it could be the reason why the script isn't working.

Could you also post any errors that occurred, would be great help.

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