Sasu Posted March 25, 2013 Share Posted March 25, 2013 What event can I select to change text? function checkLanguage() local item = guiComboBoxGetSelected(languageCheck) local text = guiComboBoxGetItemText(languageCheck, item) if text == "Español" then guiSetText(gangWindow, "Sistema de Gang V1.0") guiSetText(nameColumn, "Nombre") guiSetText(accountColumn, "Cuenta") guiSetText(addPlayerButton, "Agregar jugador") guiSetText(closeButton, "Cerrar") elseif text == "English" then guiSetText(gangWindow, "Gang System V1.0") guiSetText(nameColumn, "Name") guiSetText(accountColumn, "Account") guiSetText(addPlayerButton, "Add player") guiSetText(closeButton, "Close") end end addEventHandler("onClientGUIChanged", languageCheck, checkLanguage, false) I tried with onClientGUIClick and onClientGUIChanged but nothings happen. Link to comment
iPrestege Posted March 25, 2013 Share Posted March 25, 2013 guiComboBoxGetSelected and CheckBox there's no function to get checkbox text -- Checkboxes guiCheckBoxGetSelected guiCheckBoxSetSelected guiCreateCheckBox Link to comment
Sasu Posted March 25, 2013 Author Share Posted March 25, 2013 local item = guiComboBoxGetSelected(languageCheck) ._. And I want the event but I just have found. onClientGUIComboBoxAccepted EDIT: Oh sorry. I put CheckBox in the tittle but I wanted to write ComboBox. Link to comment
iPrestege Posted March 25, 2013 Share Posted March 25, 2013 local item = guiComboBoxGetSelected(languageCheck) ._. And I want the event but I just have found. onClientGUIComboBoxAccepted You mean that you create comboBox and not CheckBox ? or what? Link to comment
Castillo Posted March 25, 2013 Share Posted March 25, 2013 See his edited post, he meant comboBox. Link to comment
PaiN^ Posted March 25, 2013 Share Posted March 25, 2013 (edited) addEventHandler ( 'onClientGUIComboBoxAccepted', root, function ( comboBox ) local item = guiComboBoxGetSelected ( comboBox ) local text = guiComboBoxGetItemText ( comboBox, item ) if text == "Español" then guiSetText(gangWindow, "Sistema de Gang V1.0") guiSetText(nameColumn, "Nombre") guiSetText(accountColumn, "Cuenta") guiSetText(addPlayerButton, "Agregar jugador") guiSetText(closeButton, "Cerrar") elseif text == "English" then guiSetText(gangWindow, "Gang System V1.0") guiSetText(nameColumn, "Name") guiSetText(accountColumn, "Account") guiSetText(addPlayerButton, "Add player") guiSetText(closeButton, "Close") end end ) Make sure the text is totally the same, Or else it won't work .. * Edit : Thanx Anderl Edited March 25, 2013 by Guest Link to comment
Anderl Posted March 25, 2013 Share Posted March 25, 2013 You have a missing '=' in the first condition. Link to comment
Castillo Posted March 25, 2013 Share Posted March 25, 2013 addEventHandler ( 'onClientGUIComboBoxAccepted', root, function ( comboBox ) local item = guiComboBoxGetSelected ( comboBox ) local text = guiComboBoxGetItemText ( comboBox, item ) if text == "Español" then guiSetText(gangWindow, "Sistema de Gang V1.0") guiSetText(nameColumn, "Nombre") guiSetText(accountColumn, "Cuenta") guiSetText(addPlayerButton, "Agregar jugador") guiSetText(closeButton, "Cerrar") elseif text == "English" then guiSetText(gangWindow, "Gang System V1.0") guiSetText(nameColumn, "Name") guiSetText(accountColumn, "Account") guiSetText(addPlayerButton, "Add player") guiSetText(closeButton, "Close") end end ) Make sure the text is totally the same, Or else it won't work .. * Edit : Thanx Anderl What's the point of posting this? he already solved it. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now