Error en el debug?
Intenta:
local w, h = guiGetScreenSize ()
addEventHandler( "onClientRender", root,
function()
if isCursorShowing() then
local screenx, screeny, worldx, worldy, worldz = getCursorPosition()
dxDrawImage ( screenx*w, screeny*h, 16, 16, "cursor.png",0, 0, 0,tocolor( 255, 0, 0, 255 ),true)
end
end
)