RoxiCrosshairs Exports
Use exports when another trusted resource needs to temporarily hide the crosshair or control the active crosshair from server logic.
Client exports
SetCrosshairEnabled(enabled)IsCrosshairEnabled()SetCrosshairVisible(visible)GetActiveCrosshair()RefreshCrosshair()
Server exports
GetActiveCrosshair(source)SetActiveCrosshair(source, crosshairId)ClearActiveCrosshair(source)
Client example
exports["RoxiCrosshairs"]:SetCrosshairEnabled(false) Wait(5000) exports["RoxiCrosshairs"]:SetCrosshairEnabled(true)
Server example
local ok = exports["RoxiCrosshairs"]:SetActiveCrosshair(source, 12)
if not ok then
print("Crosshair was not found or is not visible to this player")
end
Integration notes
- Do not trust client-side requests for ownership-sensitive changes.
- Use server exports for active crosshair changes when possible.
- Call refresh after external preference changes so NUI receives the current config.
