Luke_Ferrara Posted January 14, 2011 Share Posted January 14, 2011 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
12p Posted January 14, 2011 Share Posted January 14, 2011 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
Luke_Ferrara Posted January 14, 2011 Author Share Posted January 14, 2011 now there is no point in my script, it is suppose to tell my cuff script if a player is cuffed, like if a cop does cuff twice the second tie it says player has already been cuffed and saved the officer a pair of handcuffs Link to comment
12p Posted January 14, 2011 Share Posted January 14, 2011 it works, that is what you want don't you? it works, it tells you if the player is cuffed! -.- Link to comment
Luke_Ferrara Posted January 14, 2011 Author Share Posted January 14, 2011 No I want it to check if the player is already handcuffed so if they do /cuff twice it doesnt just say "officer cuffed criminal" it says "criminal is already handcuffed" Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now