Castillo Posted March 18, 2012 Posted March 18, 2012 I've found your problem, you was using "CheckBox" but it was "Checkbox". Copy the code again.
iFoReX Posted March 18, 2012 Author Posted March 18, 2012 yeah thank u . but a problem : When I close the Window the Cursor dont delete
Castillo Posted March 18, 2012 Posted March 18, 2012 Copy the code again, I think it should work now.
iFoReX Posted March 18, 2012 Author Posted March 18, 2012 now can help me for cant change nick in mi server ?
iFoReX Posted March 18, 2012 Author Posted March 18, 2012 U can help me ? I dont understand de sintax please
Castillo Posted March 18, 2012 Posted March 18, 2012 It's easy, just create a server side script and cancel the event handler I posted before with cancelEvent.
iFoReX Posted March 18, 2012 Author Posted March 18, 2012 I dont know how do function offPlayerChangeNick () cancelEvent () -- stop the event from occuring end addEventHandler ( "onPlayerChangeNick", huntedPlayer, offPlayerChangeNick ) :B
Castillo Posted March 18, 2012 Posted March 18, 2012 function offPlayerChangeNick () cancelEvent () -- stop the event from occuring end addEventHandler ( "onPlayerChangeNick", root, offPlayerChangeNick ) -- What is "huntedPlayer"?
iFoReX Posted March 18, 2012 Author Posted March 18, 2012 I copy of the wiki and I dont understand the sintax because I put "huntedPlayer"
iFoReX Posted March 18, 2012 Author Posted March 18, 2012 what is bad ? GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(214,198,427,231,"GUI Cambiar Pass",true) GUIEditor_Image[1] = guiCreateStaticImage(27,178,94,42,"images/BAT.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(126,175,82,45,"images/shruk.png",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(219,181,198,24,"GUI CopyRight 2012 (c) by ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255, 255, 0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_TabPanel[1] = guiCreateTabPanel(13,27,405,144,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Cambiar Password",GUIEditor_TabPanel[1]) GUIEditor_Label[2] = guiCreateLabel(20,18,125,24,"Vieja Contraseña",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[2],0, 0, 255) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(126,12,172,29,"",false,GUIEditor_Tab[1]) guiEditSetMaxLength(GUIEditor_Edit[1],10) GUIEditor_Label[3] = guiCreateLabel(9,57,104,23,"Nueva Contraseña",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],0, 0, 255) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(127,50,172,29,"",false,GUIEditor_Tab[1]) guiEditSetMaxLength(GUIEditor_Edit[2],10) GUIEditor_Button[1] = guiCreateButton(309,12,83,33,"Aceptar",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(308,51,83,33,"Cancelar",false,GUIEditor_Tab[1]) GUIEditor_Label[4] = guiCreateLabel(20,18,125,24,"Old Password",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[4],0,0,255) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Label[5] = guiCreateLabel(9,57,104,23,"New Password",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[5],0,0,255) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[3] = guiCreateButton(309,12,83,33,"Accept",false,GUIEditor_Tab[1]) GUIEditor_Button[4] = guiCreateButton(308,51,83,33,"Cancel",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Cambiar Nick",GUIEditor_TabPanel[1]) GUIEditor_Label[6] = guiCreateLabel(146,15,73,19,"Nuevo Nick",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[6],0, 0, 255) guiSetFont(GUIEditor_Label[6],"clear-normal") GUIEditor_Edit[3] = guiCreateEdit(88,48,184,34,"",false,GUIEditor_Tab[2]) guiEditSetMaxLength(GUIEditor_Edit[3],22) GUIEditor_Button[5] = guiCreateButton(289,17,105,37,"Aceptar",false,GUIEditor_Tab[2]) GUIEditor_Button[6] = guiCreateButton(289,59,105,37,"Cancelar",false,GUIEditor_Tab[2]) GUIEditor_Button[7] = guiCreateButton(289,17,105,37,"Accept",false,GUIEditor_Tab[2]) GUIEditor_Button[8] = guiCreateButton(289,59,105,37,"Cancel",false,GUIEditor_Tab[2]) GUIEditor_Label[7] = guiCreateLabel(146,15,73,19,"New Nick",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[7],0,0,255) guiSetFont(GUIEditor_Label[7],"clear-normal") addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Image[1] ) then guiSetVisible ( GUIEditor_Label[2], true ) guiSetVisible ( GUIEditor_Label[6], true ) guiSetVisible ( GUIEditor_Label[3], true ) guiSetVisible ( GUIEditor_Label[4], false ) guiSetVisible ( GUIEditor_Label[5], false ) guiSetVisible ( GUIEditor_Checkbox[1], true ) guiSetVisible ( GUIEditor_Checkbox[2], false ) guiSetVisible ( GUIEditor_Button[1], true ) guiSetVisible ( GUIEditor_Button[2], true ) guiSetVisible ( GUIEditor_Button[3], false ) guiSetVisible ( GUIEditor_Button[4], false ) guiSetVisible ( GUIEditor_Button[5], true ) guiSetVisible ( GUIEditor_Button[6], true ) elseif ( source == GUIEditor_Button[1] ) then outputChatBox("'#00ff00Para Tener Tu Nueva Contraseña Favor pon /reconnect") elseif ( source == GUIEditor_Image[2] ) then guiSetVisible ( GUIEditor_Label[2], false ) guiSetVisible ( GUIEditor_Label[6], false ) guiSetVisible ( GUIEditor_Label[3], false ) guiSetVisible ( GUIEditor_Label[4], true ) guiSetVisible ( GUIEditor_Label[5], true ) guiSetVisible ( GUIEditor_Checkbox[2], true ) guiSetVisible ( GUIEditor_Checkbox[1], false ) guiSetVisible ( GUIEditor_Button[3], true ) guiSetVisible ( GUIEditor_Button[4], true ) guiSetVisible ( GUIEditor_Button[1], false ) guiSetVisible ( GUIEditor_Button[2], false ) guiSetVisible ( GUIEditor_Button[5], false ) guiSetVisible ( GUIEditor_Button[6], false ) elseif ( source == GUIEditor_Button[2] ) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) guiSetInputEnabled(false) elseif ( source == GUIEditor_Checkbox[1] ) then guiSetEnabled ( GUIEditor_Button[1], guiCheckBoxGetSelected ( source ) ) elseif ( source == GUIEditor_Checkbox[2] ) then guiSetEnabled ( GUIEditor_Button[4], guiCheckBoxGetSelected ( source ) ) elseif ( source == GUIEditor_Button[3] ) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) guiSetInputEnabled(false) end end ) changepassmarket = createMarker (273.19537, -158.01585, 0, "cylinder", 3, 255, 0, 0, 100) car1 = createBlip ( 273.19537, -158.01585, 1.74052,35,2,0,0,0,0,0,180 ) function markerHit (hitPlayer) if ( hitPlayer == localPlayer ) then guiSetVisible (GUIEditor_Window[1], true) showCursor (true) end end addEventHandler ("onClientMarkerHit", changepassmarket, markerHit) addEventHandler ( "onClientPlayerDamage", root, function ( ) if ( isElementWithinMarker ( localPlayer, changepassmarket ) ) then setElementHealth ( localPlayer, 100 ) end end ) function clientSubmitChangepw(button, state) if button == "left" and state == "up" then local oldpassword = guiGetText(GUIEditor_Edit[1]) local newpassword = guiGetText(GUIEditor_Edit[2]) if oldpassword and newpassword then triggerServerEvent("submitChangepw", getRootElement(), localPlayer, oldpassword, newpassword) else outputChatBox("Pon Tu vieja Contraseña y Tu Nueva Contraseña.") end end end addEventHandler( "onClientGUIClick", GUIEditor_Button[1], clientSubmitChangepw, false)
Castillo Posted March 18, 2012 Posted March 18, 2012 How can we tell you what's wrong if you don't tell us what doesn't work.
iFoReX Posted March 18, 2012 Author Posted March 18, 2012 the problem is this : when I go to market only appear the cursor dont the window
Kenix Posted March 18, 2012 Posted March 18, 2012 https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI
iFoReX Posted March 18, 2012 Author Posted March 18, 2012 kenix I know how do the GUI the problem is I create a new gui but my old events and I done some one bad
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