Jump to content

function not working?


Luke_Ferrara

Recommended Posts

  
function isPlayerCuffed(other) 
local other, name = exports.players:getFromName(  other ) 
        if (other) then 
        local test = getControlState(other, jump) 
        outputDebugString("other not found") 
        if  test then 
                return true 
            end 
        end 
        return false 
end 
  

always returns false, i have a command that uses /cuff that toggles the control of jump and /uncuff enables jump again, however when you use /uncuff it says theier already uncuffed even when jump is disabled.....

any ideas??

Link to comment
  
function isPlayerCuffed(other) 
local other, name = exports.players:getFromName(  other ) 
        if (other) then 
        local test = getControlState(other, jump) 
        outputDebugString("other not found") 
        if  test then 
                return true 
            end 
        end 
        --return false WHAT THE HELL IS THIS? Are you blind? This is causing the function to return "false"  
end 
  

  
function isPlayerCuffed(other) 
local other, name = exports.players:getFromName(  other ) 
        if (other) then 
        local test = getControlState(other, jump) 
        outputDebugString("other not found") 
           if  test then 
                return true 
           else 
                return false --YOU SEE, HERE WILL WORK 
           end 
        end 
         
end 
  

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