guiRadioButtonSetSelected | Multi Theft Auto: Wiki Skip to content

guiRadioButtonSetSelected

Client-side
Server-side
Shared

Pair: guiRadioButtonGetSelected

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 or unselects a radio button.

Syntax

guiRadioButtonSetSelected ( )

Code Examples

client

This example creates a radio button then checks if one is selected and if it is, then it's output the title and sets the next radio button selected. (TESTED!)

hi = guiCreateRadioButton(243,204,36,16,"Hi",false)
guiRadioButtonSetSelected(hi,true)
bye = guiCreateRadioButton(243,224,41,16,"Bye",false)
if(guiRadioButtonGetSelected(hi))then
outputChatBox("Hi "..getPlayerName(localPlayer))
guiRadioButtonSetSelected(bye,true)
else
outputChatBox("Bye "..getPlayerName(localPlayer))
guiRadioButtonSetSelected(hi,true)
end

See Also

GUI Functions