Xwad Posted March 12, 2016 Posted March 12, 2016 hi im trying to replace the cursors image with a script but its not working. i hope you can help me thanks. client.lua function show() local showing = isCursorShowing () if showing then local screenx, screeny = getCursorPosition() dxDrawImage ( 5, 5, 50, 50, 'files/crosshair.png', screenx, screeny ) setCursorAlpha(0) end end addEventHandler('onClientRender', root, show )
ozulus Posted March 12, 2016 Posted March 12, 2016 --[b]UPDATED[/b] function show() local showing = isCursorShowing () if showing and ( cursorX ~= nil and cursorY ~= nil ) then dxDrawImage ( cursorX, cursorY, 50, 50, 'files/crosshair.png') setCursorAlpha(0) end end addEventHandler('onClientRender', root, show ) addEventHandler( "onClientCursorMove", getRootElement( ), function( _, _, absX, absY ) cursorX = absX cursorY = absY end )
RenanPG Posted March 13, 2016 Posted March 13, 2016 setCursorAlpha(0) function show() local showing = isCursorShowing () if showing then local screenx, screeny = getCursorPosition() dxDrawImage(screenx, screeny, 50, 50, 'files/crosshair.png') end end addEventHandler('onClientRender', root, show )
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