Jump to content

Help Me


Recommended Posts

Hi all :D

This Cods @

  
window = guiCreateWindow(202,192,655,432,"news",false) 
    showCursor (true) 
butto = guiCreateButton(0.8336,0.7662,0.142,0.1366,"Edit",true,window) 
  
editBo = guiCreateMemo(0.0229,0.0579,0.8015,0.9097,"",true,window)   
  
Close = guiCreateButton(0.8336,0.088,0.142,0.1366,"Close",true,window) 
  
-------------------------------------------------------------------------- 
  
  
windows = guiCreateWindow(202,192,655,432," Edit news",false) 
guiSetVisible ( windows, false ) 
  
button = guiCreateButton(0.8336,0.7662,0.142,0.1366,"Edit",true,windows) 
  
editBox = guiCreateMemo(0.0229,0.0579,0.8015,0.9097,"",true,windows) 
  
Closes = guiCreateButton(0.8336,0.088,0.142,0.1366,"Close",true,windows) 
  
  
guiEditSetMaxLength ( editBox, 128 )  
  
  
  
---------------------------------------------------- 
function eta() 
if (source == butto) then 
guiSetVisible ( windows, true ) 
  
   end 
end 
addEventHandler("onClientGUIClick",butto,eta,false) 
  
function closeInfo ( ) 
        if ( guiGetVisible ( windows ) == true ) then            
                guiSetVisible ( windows, false ) 
                    showCursor (false) 
  
        end 
end 
addEventHandler ("onClientGUIClick", Closes, closeInfo) 
  
  
  
function closeInfo ( ) 
        if ( guiGetVisible ( window ) == true ) then            
                guiSetVisible ( window, false ) 
                                    showCursor (false) 
  
        end 
end 
addEventHandler ("onClientGUIClick", Close, closeInfo) 
  
  
function info(text) 
        if source == button then 
  
        local text = guiGetText ( editBox ) 
        if text and text ~= "eeee" then 
        guiSetText(editBo,""..text.."",editBox) 
  
        end 
        end 
     
 end 
addEventHandler ( "onClientGUIClick", button, info ) 
  
------------------------------------------------------------------------- 
  

Link to comment

That is one messy code.. anyhow /debugscript 3 and please, might tell us what's wrong / not working?

anyhow.. try:

editBox = guiCreateEdit(0.0229,0.0579,0.8015,0.9097,"",true,windows) 

instead of:

editBox = guiCreateMemo(0.0229,0.0579,0.8015,0.9097,"",true,windows) 

Link to comment

Totally messed code.

eWindow      = guiCreateWindow(202,192,655,432,"news",false) 
eEdit        = guiCreateButton(0.8336,0.7662,0.142,0.1366,"Edit",true,window) 
eBox         = guiCreateMemo(0.0229,0.0579,0.8015,0.9097,"",true,window)   
eClose       = guiCreateButton(0.8336,0.088,0.142,0.1366,"Close",true,window) 
  
showCursor ( true ) 
  
-- 
  
eNews       = guiCreateWindow(202,192,655,432," Edit news",false) 
eNEdit      = guiCreateButton(0.8336,0.7662,0.142,0.1366,"Edit",true,windows) 
eNBox       = guiCreateMemo(0.0229,0.0579,0.8015,0.9097,"",true,windows) 
eNClose     = guiCreateButton(0.8336,0.088,0.142,0.1366,"Close",true,windows) 
  
guiSetVisible ( eNews, false ) 
  
guiEditSetMaxLength ( eNBox, 128 )  
  
-- 
  
addEventHandler ( 'onClientResourceStart', resourceRoot, 
    function ( ) 
        addEventHandler ( 'onClientGUIClick', root, showGUI ) 
    end 
) 
  
-- 
  
function showGUI ( ) 
    if ( source == eEdit ) then 
        guiSetVisible ( eNews, true ) 
    elseif ( source == eNClose ) then 
        guiGetVisible ( eNews ) and showCursor ( false ) and guiSetVisible ( eNews, false ) 
    elseif ( source == eClose ) then 
        guiSetVisible ( eWindow, false ) 
        showCursor ( false ) 
    elseif ( source == eNEdit ) then 
        local cText = guiGetText ( eNBox ) 
        if ( cText and cText ~= 'eeee' ) then 
            guiSetText ( eBox, cText ) 
        end 
    end 
) 

Edited by Guest
Link to comment

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...