Jump to content

ساعودي سريع الكود مش بيشتغل


developer

Recommended Posts

ابي مساعده في دا الكود

GUIEditor = { 
    button = {}, 
    window = {} 
}    
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
       GUIEditor.window[1] = guiCreateWindow(441, 128, 622, 484, "BY IIwantedII", false) 
        guiWindowSetSizable(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") 
            FOG=   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 
  
  
) 
  
  
     guiSetVisible (Window, false)   
function OpenWin() 
    if guiGetVisible ( Window ) then 
       guiSetVisible ( Window, false ) 
       showCursor(false) 
       guiSetInputEnabled(false) 
    else 
        guiSetVisible ( Window, true ) 
        showCursor(true) 
        guiSetInputEnabled(true) 
  
    end 
end 
bindKey("F2", "down", OpenWin) 
  
  
addEventHandler ("onClientGUIClick", getRootElement(), 
function () 
if source == FOG then 
setWeather ( 9 ) 
outputChatBox("WEATHER CHANGED TO FOGGY !!!") 
end 
 end 
) 

Edited by Guest
Link to comment

انت مسوي خبصه هنا:

FOG=   GUIEditor.button[2]  guiCreateButton(9, 161, 603, 92, "FOG", false, GUIEditor.window[1]) 

المفروض تسويه كذا:

GUIEditor.button[2] = guiCreateButton(9, 161, 603, 92, "FOG", false, GUIEditor.window[1]) 

و هذا تغيره:

if source == FOG then 

إلى:

if source == GUIEditor.button[2] then 

Link to comment

عندك أخطاء في الكود, عدلتها كلها

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 
) 

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