M MY Multiplayer: Wiki
Side
Kind

showCursor

Client

Shows or hides the mouse cursor for this resource.

bool showCursor(bool show [, bool toggleControls = true])

Parameters

NameTypeDescription
showbooltrue to show it, false to withdraw this resource's request.
toggleControlsboolIf true, the player's controls are off while the cursor shows.default true

Returns

true when the request was taken.

Each resource makes its own request. The cursor shows while any resource asks for it, and the controls are off while any of those requests used toggleControls. Hiding only withdraws this resource's request, and the request goes away when the resource stops.

Example

bindKey("m", "down", function()
    showCursor(not isCursorShowing())
end)

See also