عندك أخطاء في الكود, عدلتها كلها
GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(441, 128, 622, 484, "BY IIwantedII", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetVisible(GUIEditor.window[1], false)
GUIEditor.button[1] = guiCreateButton(20, 43, 592, 80, "RAIN", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[1], "clear-normal")
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0929F0")
GUIEditor.button[2] = guiCreateButton(9, 161, 603, 92, "FOG", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0633F5")
GUIEditor.button[3] = guiCreateButton(10, 269, 602, 92, "SUNNY", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFF2F505")
GUIEditor.button[4] = guiCreateButton(22, 384, 590, 90, "DUST", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FF0929F0")
end
)
function OpenWin()
if guiGetVisible(GUIEditor.window[1]) then
guiSetVisible(GUIEditor.window[1], false)
showCursor(false)
else
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
end
end
bindKey("F2", "down", OpenWin)
addEventHandler ("onClientGUIClick", getRootElement(),
function ()
if ( source == GUIEditor.button[2] ) then
setWeather ( 9 )
outputChatBox("WEATHER CHANGED TO FOGGY !!!")
end
end
)