Jump to content

help me i don't know how to do this


Recommended Posts

Alsalam Alaykum , Hello

how are you guy ? I hope you are well .

am training on Data and am a noob :oops:

look at this code

  
GUIEditor = { 
    button = {}, 
    window = {}, 
    edit = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(368, 222, 138, 165, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetAlpha(GUIEditor.window[1], 1.00) 
  
        GUIEditor.button[1] = guiCreateButton(10, 61, 120, 15, "Refresh", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "default-small") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.edit[1] = guiCreateEdit(9, 21, 121, 35, "", false, GUIEditor.window[1]) 
        guiEditSetReadOnly(GUIEditor.edit[1], true) 
        guiEditSetMasked(GUIEditor.edit[1], true) 
        GUIEditor.button[2] = guiCreateButton(10, 82, 120, 15, "1", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "default-small") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(10, 102, 120, 15, "2", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[3], "default-small") 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(10, 123, 119, 15, "True", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[4], "default-small") 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[5] = guiCreateButton(10, 142, 119, 15, "False", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[5], "default-small") 
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA")     
    end 
) 
  
  
  
addEventHandler("onClientGUIClick",getRootElement(), 
function() 
    if ( source == GUIEditor.button[2] ) then 
    triggerServerEvent("one", localPlayer) 
    end 
end) 
  
addEventHandler("onClientGUIClick",getRootElement(), 
function() 
    if ( source == GUIEditor.button[1] ) then 
    triggerServerEvent("two", localPlayer) 
    guiSetText ( GUIEditor.edit[1], tzwer ) 
    end 
end) 

  
addEvent("one",true)  
addEventHandler("one",root,  
function () 
local account = getPlayerAccount ( source ) 
setAccountData ( account, "ro5sa", "1" ) 
end  
) 
  
  
  
addEvent("two",true)  
addEventHandler("two",root,  
function () 
local account = getPlayerAccount ( source ) 
tzwer = getAccountData ( account, "ro5sa" ) 
end  
) 
  

so the problem is in this line

guiSetText ( GUIEditor.edit[1], tzwer )

idk how to output var from server to client

help me pls

am waiting :roll::roll:

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