guiCheckBoxSetSelected | Multi Theft Auto: Wiki Skip to content

guiCheckBoxSetSelected

Client-side
Server-side
Shared

Pair: guiCheckBoxGetSelected

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function selects (ticks) or unselects a checkbox.

Syntax

guiCheckBoxSetSelected ( )

Code Examples

client

This example creates 2 checkboxes and sets one of them selected then checks if the first one is selected and if it is then the second one would be set selected.

checkedBox = guiCreateCheckBox(20,30,150,20,"Checked checkbox",true,false)
uncheckedBox = guiCreateCheckBox(20,30,150,20,"UnChecked checkbox",false,false)
if(guiCheckBoxGetSelected(checkedBox))then
guiCheckBoxSetSelected(uncheckedBox,true)
else
guiCheckBoxSetSelected(checkedBox,true)
end

See Also

GUI Functions