IsPlayerCrosshairVisible

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.6.0 r22751:
This function checks if the local player has showing crosshair.


[[{{{image}}}|link=|]] Note: This function always returns true for spraycan and fire extinguisher.

Syntax

bool isPlayerCrosshairVisible()

Returns

Returns true if the player has the crosshair visible, false otherwise.

Example

function check()
   outputChatBox("Crosshair: "..(isPlayerCrosshairVisible() and "visible" or "not visible", 255, 255, 0) -- output text 
end
addCommandHandler("crosshair", check)

See Also