Sasu Posted March 25, 2013 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. State: Inactive
iPrestege Posted March 25, 2013 Posted March 25, 2013 guiComboBoxGetSelected and CheckBox there's no function to get checkbox text -- Checkboxes guiCheckBoxGetSelected guiCheckBoxSetSelected guiCreateCheckBox
Sasu Posted March 25, 2013 Author 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. State: Inactive
iPrestege Posted March 25, 2013 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?
Castillo Posted March 25, 2013 Posted March 25, 2013 See his edited post, he meant comboBox. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
PaiN^ Posted March 25, 2013 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 " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
Anderl Posted March 25, 2013 Posted March 25, 2013 You have a missing '=' in the first condition. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
Castillo Posted March 25, 2013 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. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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