Jump to content

executeCommandHandler..?


.:HyPeX:.

Recommended Posts

Well, this isnt working, why?

  
addEventHandler("onClientClick", root, function(btn, ste) 
if btn ~= "left" then return end 
if ste ~= "down" then return end 
    if teamJoiner then 
    local cx,cy = getCursorPosition() 
    if cx > 0.3 and cx < 0.4 then 
        if cy > 0.4 and cy < 0.475 then 
        executeCommandHandler("JoinTeam", "a") 
        outputChatBox("Joined Team A") 
        end 
    elseif cx > 0.425 and cx < 0.525 then 
        if cy > 0.4 and cy < 0.475 then 
        executeCommandHandler("JoinTeam", "s") 
        end 
    elseif cx > 0.55 and cx < 0.65 then 
        if cy > 0.4 and cy < 0.475 then 
        executeCommandHandler("JoinTeam", "b") 
        end  
    end 
    end 
end) 

if i do "/JoinTeam a" it works just fine, and the outputChatBox happens...

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