xTeacherx Posted April 29, 2012 Posted April 29, 2012 hi all this is cod function mta () window = guiCreateWindow(223,43,629,714,"news",false) guiSetAlpha(window,0.6) editBox = guiCreateMemo(0.0207,0.5392,0.965,0.3754,"",true,window) button = guiCreateButton(0.027,0.9202,0.4563,0.0672,"Edit",true,window) g = guiCreateButton(0.3943,0.2115,0.1558,0.0994,"",true,window) vv1 = guiCreateLabel(0.0318,0.5196,0.9412,0.021,"×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××",true,window) guiLabelSetColor(vv1,255,0,0) Close = guiCreateButton(0.5437,0.9202,0.4372,0.0672,"Clear",true,window) addEventHandler ( "onClientGUIClick", editBox, outputEditBox ) guiEditSetMaxLength ( editBox, 128 ) end addCommandHandler("edit", mta) -------------------------------------------------------------------------- function closeInfo ( ) if ( guiGetVisible ( window ) == true ) then guiSetVisible ( window, false ) end end addEventHandler ("onClientGUIClick", Close, closeInfo) function outputEditBox () local text = guiGetText ( editBox ) editBo = guiCreateMemo(0.0223,0.0322,0.9603,0.493,""..text.."",true,window) end addEventHandler ( "onClientGUIClick", button, outputEditBox ) now i dont have any problem but i wanna ( button = guiCreateButton) true for admini and false for any one
KenXeiko Posted April 29, 2012 Posted April 29, 2012 My idea is to set data to the player when player login. Well, good luck. setElementData getElementData guiSetEnabled onPlayerLogin Multi Theft Auto: San Andreas - DM/DD Race Server Multi Theft Auto: San Andreas - Freeroam Server (WIP) Wolfenstein: Enemy Territory Server Mafia II Multiplayer Server More Insane-Players Server
iFoReX Posted April 29, 2012 Posted April 29, 2012 is more easy it ? function mta () window = guiCreateWindow(223,43,629,714,"news",false) guiSetAlpha(window,0.6) editBox = guiCreateMemo(0.0207,0.5392,0.965,0.3754,"",true,window) button = guiCreateButton(0.027,0.9202,0.4563,0.0672,"Edit",true,window) g = guiCreateButton(0.3943,0.2115,0.1558,0.0994,"",true,window) vv1 = guiCreateLabel(0.0318,0.5196,0.9412,0.021,"×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××",true,window) guiLabelSetColor(vv1,255,0,0) Close = guiCreateButton(0.5437,0.9202,0.4372,0.0672,"Clear",true,window) addEventHandler ( "onClientGUIClick", editBox, outputEditBox ) ---I dont undestand it ? a onClientGUIClick in an function ? guiEditSetMaxLength ( editBox, 128 ) end addCommandHandler("edit", mta) -------------------------------------------------------------------------- function closeInfo ( ) guiSetVisible(window,false) showCursor(false) end addEventHandler ("onClientGUIClick", Close, closeInfo) function outputEditBox () local text = guiGetText ( editBox ) if source == button then editBo = guiCreateMemo(0.0223,0.0322,0.9603,0.493,"",true,window) guiSetText(editBo, "..text..") ---Is more easy set a text end end addEventHandler ( "onClientGUIClick", root, outputEditBox ) elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted April 29, 2012 Posted April 29, 2012 @ElMota: What has that to do with his problem? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
KenXeiko Posted April 29, 2012 Posted April 29, 2012 @ElMota: From what I see, xTeacherx just want to enable Edit button for Admin, and disable it from others. And on your codes, yes, it's actually possible to pur addEventHandler on an function. Multi Theft Auto: San Andreas - DM/DD Race Server Multi Theft Auto: San Andreas - Freeroam Server (WIP) Wolfenstein: Enemy Territory Server Mafia II Multiplayer Server More Insane-Players Server
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