Jump to content

help


xTeacherx

Recommended Posts

Posted

hi all :D

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 :D

Posted

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

430x73_FFFFFF_FF9900_000000_000000.png
Posted

@ElMota: What has that to do with his problem?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

@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

350x20.png

Multi Theft Auto: San Andreas - Freeroam Server (WIP)

350x20.png

Wolfenstein: Enemy Territory Server

350x20.png

Mafia II Multiplayer Server

350x20.png

More Insane-Players Server

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...