Hero192 Posted August 28, 2015 Posted August 28, 2015 Hey guys , I want to do an exports for Cursor, i want it be like that exports.Mouse:mouse(false) replace the showCursor(false) because i use the resource Mouse and if i want to cancel the mouse i need to do an exports it doesn't cancel it with showCursor i already tried that. --Mouse script for export: (I already added the function exports to meta, problem is on the script i tried this way but doesn't works , please give me a hand if you know.. function enablemouse (key, keyState) if(isCursorShowing()) then showCursor(false) end end function mouse () return enablemouse end
JR10 Posted August 28, 2015 Posted August 28, 2015 What exactly is the problem here? showCursor is resource based, if you use showCursor in a certain resource you have to hide it from the same resource.
Hero192 Posted August 28, 2015 Author Posted August 28, 2015 What exactly is the problem here?showCursor is resource based, if you use showCursor in a certain resource you have to hide it from the same resource. When i use the Cursor from this resource i binded it in a key, for example if i want to hide the cursor after clicking on the button it doesn't works i have to exports the cursor from the Cursor file, so please just helps me to exports it because i don't know how and i know what am i talking about..
TAPL Posted August 28, 2015 Posted August 28, 2015 Client for Mouse resource: function setMouseState(state) showCursor(state) end export in the meta: function="setMouseState" type="client"/> Usage: exports.Mouse:setMouseState(true) -- to show the mouse exports.Mouse:setMouseState(false) -- to hide the mouse
Noki Posted August 28, 2015 Posted August 28, 2015 function toggleCursor() showCursor(not isCursorShowing()) end No arguments needed.
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