TheIceman1 Posted March 4, 2013 Share Posted March 4, 2013 Why this dont set my fightin style to "Boxing"?No errors. Client function box () if ( guiCheckBoxGetSelected(GUIEditor_Checkbox[1]) ) then triggerServerEvent ( getLocalPlayer(), "box" ) end end addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], box ) Server function box () if ( getPlayerMoney(source) >= 1000 ) then setPedFightingStyle ( source, 5 ) takePlayerMoney ( source, 1000 ) else exports ["guimessages"] : outputServer ( source, "You don't have enought money!" , 255, 255, 0 ) end end addEvent ( "box", true ) addEventHandler ( "box", root, box ) Link to comment
X-SHADOW Posted March 4, 2013 Share Posted March 4, 2013 addEventHandler('onClientGUIClick', root, function ( ) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected(GUIEditor_Checkbox[1]) ) then triggerServerEvent('box', localPlayer) end end end ) addEvent('box', true) addEventHandler('box', root, function ( ) if (getPlayerMoney( source ) >= 1000 ) then takePlayerMoney ( source, 1000 ) setPedFightingStyle( source, 5 ) else exports["guimessages"] : outputServer ( source, "You don't have enought money!" , 255, 255, 0 ) end end ) Link to comment
TheIceman1 Posted March 4, 2013 Author Share Posted March 4, 2013 addEventHandler('onClientGUIClick', root, function ( ) if ( source == GUIEditor_Button[1] ) then triggerServerEvent('box', localPlayer) end end ) addEvent('box', true) addEventHandler('box', root, function ( ) if (getPlayerMoney( source ) >= 1000 ) then takePlayerMoney ( source, 1000 ) setPedFightingStyle( source, 5 ) else exports["guimessages"] : outputServer ( source, "You don't have enought money!" , 255, 255, 0 ) end end ) Noo,you dont understand,you must read script! Link to comment
X-SHADOW Posted March 4, 2013 Share Posted March 4, 2013 You want if player check the box and press the button setFightingStyle to Boxing right ? if so then this is it . Link to comment
TheIceman1 Posted March 5, 2013 Author Share Posted March 5, 2013 You want if player check the box and press the button setFightingStyle to Boxing right ?if so then this is it . Working,thanks! Link to comment
TheIceman1 Posted March 5, 2013 Author Share Posted March 5, 2013 how to do that, 2 check box cant be selected at same time?Well,when I click on the first checkbox then first checkbox is selected,but when I click on second checkbox then first checkbox is unselected and second checkbox is selected.Understand? Link to comment
PaiN^ Posted March 5, 2013 Share Posted March 5, 2013 addEventHandler("onClientGUIClick", root, function () if getElementType(source) == "gui-checkbox" then if (source == Checkbox1) then guiCheckBoxSetSelected(Checkbox2, false) elseif (source ==Checkbox2) then guiCheckBoxSetSelected(Checkbox1, false) end end end ) Link to comment
TAPL Posted March 5, 2013 Share Posted March 5, 2013 how to do that, 2 check box cant be selected at same time?Well,when I click on the first checkbox then first checkbox is selected,but when I click on second checkbox then first checkbox is unselected and second checkbox is selected.Understand? https://wiki.multitheftauto.com/wiki/GuiCreateRadioButton Link to comment
PaiN^ Posted March 5, 2013 Share Posted March 5, 2013 how to do that, 2 check box cant be selected at same time?Well,when I click on the first checkbox then first checkbox is selected,but when I click on second checkbox then first checkbox is unselected and second checkbox is selected.Understand? https://wiki.multitheftauto.com/wiki/GuiCreateRadioButton He want's it as checkbox not radio button .. Link to comment
TAPL Posted March 5, 2013 Share Posted March 5, 2013 how to do that, 2 check box cant be selected at same time?Well,when I click on the first checkbox then first checkbox is selected,but when I click on second checkbox then first checkbox is unselected and second checkbox is selected.Understand? https://wiki.multitheftauto.com/wiki/GuiCreateRadioButton He want's it as checkbox not radio button .. Ok don't tell anyone. 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