hai, i'm kinda new, but
i got this simple script to activate the cursor, but it doesn't seem to work, can anyone help me?
here the script:
addEventHandler ( "onResourceLoad", getRootElement(), "loadScripts" )
function loadScripts
for index, player in getElementsByType ( "player" ) do
bindKey ( player, "p"down", "hookCursor" )
end
end
addEventHandler ( "onPlaterJoin", getRootElement(), "handleSingleJoin" )
function handleSingleJoin
bindKey( source, "p" "down", "hookCursor" )
end
function hookCursor
if isCursorShowing ( source ) then
showCursor ( source, false )
else
showCursor ( source, true )
end
end
and
here is the meta.xml:
- <meta>
<info src="test.lua" type="client" version="1.0.0" />
</meta>]