# UltimateCrosshair

### Example use of these exports in your code;

> ```lua
> RegisterCommand("setrgb", function(source, args rawCommand)
>     exports.crosshair:setCrosshairRGB(255, 255, 255, true)
> end)
> ```
>
> ```
> RegisterCommand("iscrosshairenabled", function(source, args rawCommand)
>     print(tostring(exports.crosshair.getCrosshairEnabled()))
> end)
> ```

### setCrosshairThickness(thickness, save)

Sets the thickness of the crosshair.\
\
Parameters:\
\
\- thickness => integer between 1-3, with 3 being the thickest\
\- save =>  boolean of whether to save the changes to the crosshair to client-storage; this should be true unless changing multiple values at once, in which case it should be saved after all the changes.

### setCrosshairLength(length, save)

Sets the length of the crosshair.\
\
Parameters:\
\
\- length => integer between 1-20, with 20 being the longest\
\- save =>  boolean of whether to save the changes to the crosshair to client-storage; this should be true unless changing multiple values at once, in which case it should be saved after all the changes.

### setCrosshairGap(length, save)

Sets the gap size of the crosshair.\
\
Parameters:\
\
\- gap => integer between 1-20, with 20 being the biggest gap\
\- save =>  boolean of whether to save the changes to the crosshair to client-storage; this should be true unless changing multiple values at once, in which case it should be saved after all the changes.

### setCrosshairEnabled(enabled, save)

Sets whether the custom crosshair is enabled.\
\
Parameters:\
\
\- enabled => boolean\
\- save =>  boolean of whether to save the changes to the crosshair to client-storage; this should be true unless changing multiple values at once, in which case it should be saved after all the changes.

### setCrosshairEnabled(enabled, save)

Sets whether the custom crosshair is enabled.\
\
Parameters:\
\
\- enabled => boolean\
\- save =>  boolean of whether to save the changes to the crosshair to client-storage; this should be true unless changing multiple values at once, in which case it should be saved after all the changes.

### setCrosshairDotEnabled(enabled, save)

Sets whether the dot of the crosshair is enabled.\
\
Parameters:\
\
\- enabled => boolean\
\- save =>  boolean of whether to save the changes to the crosshair to client-storage; this should be true unless changing multiple values at once, in which case it should be saved after all the changes.

### setCrosshairRGB(red, green, blue, save)

Sets the crosshairs' RGB colour settings.\
\
Parameters:\
\
\- red, green, blue => all integers, 0-255\
\- save =>  boolean of whether to save the changes to the crosshair to client-storage; this should be true unless changing multiple values at once, in which case it should be saved after all the changes.

### getCrosshairRGB()

Returns a table of the crosshair's current RGB settings with the values red, green, and blue as integers.\
\
eg. getCrosshairRGB().red

### getCrosshairEnabled()

Returns either 1 or 0, of enabled or disabled respectively.

### getCrosshairDotEnabled()

Returns either 1 or 0, of enabled or disabled respectively.

### getCrosshairGap()

Returns the current setting for the crosshairs gap as an integer, 1-20.

### getCrosshairThickness()

Returns the current setting for the crosshairs thickness as an integer, 1-3.

### getCrosshairLength()

Returns the current setting for the crosshairs length as an integer, 1-20.

\
\ <br>
