Jump to content

x[ استفسار ]x guiSetText حل الكود مايشتغل


Avir14

Recommended Posts

الحين انا ابيه اذا القلتش شغال يغير الليبل عند كل الناس  

--Client

GUIEditor = {
    label = {},
    window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(746, 409, 429, 418, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
   label = guiCreateLabel(128, 186, 188, 111, "TEXT", false, GUIEditor.window[1])    
    end
)

function aapp ()
local tee = guiSetText ( label , "On" )   
      triggerServerEvent("Me",localPlayer)
end
addEventHandler ( "onClientRender", root, aapp )
 

--Server 

addEvent("Me",true)
addEventHandler("Me",root,
  function (tee)
if (getServerConfigSetting( "bullet_sync" ) == "1" ) then
tee
end
end
)
 

-- الكلام الي يطلع بالدي بق

ERROR: Loading script failed: TestScript server.lua:6: '=' expected near 'end'
ERROR: Client (unle) triggered serverside event Me, but event is not added serverside
 

Edited by AmirHzz
Link to comment
-- Server
setTimer(function()
if (getServerConfigSetting( "bullet_sync" ) == "1" ) then
setElementData(resourceRoot,"CheatOn",true)
else
removeElementData(resourceRoot,'CheatOn')
end
end,50,0)
-- Client
GUIEditor = {
    label = {},
    window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(746, 409, 429, 418, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
   label = guiCreateLabel(128, 186, 188, 111, "TEXT", false, GUIEditor.window[1])    
    end
)

function aapp ()
if ( getElementData(resourceRoot,'CheatOn') == true ) then
guiSetText(label,'On')
else
guiSetText(label,'false')
end
end
addEventHandler ( "onClientRender", root, aapp )

try it

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