Jump to content

مشآكلي My problems


Recommended Posts

function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) 
    mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Back1.png", relative2 ) 
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) 
    guiSetEnabled ( mainBackgroundLabel, false ) 
    return mainBackground 
end 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
  
  
GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) 
GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) 
guiSetVisible (GUIEditor_Window[1], false) 
guiSetVisible (GUIEditor_Window[2], false) 
Background = guiCreateButton(255,70,90,30,"Background",false,GUIEditor_Window[1]) 
  
local load = false 
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == Background then 
                        guiStaticImageLoadImage(mainBackground,load and "Back1.png" or "Back2.png")     
            load = not load 
        end 
    end 
) 

جربةة

Link to comment
  • Replies 110
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) 
    mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Back1.png", relative2 ) 
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) 
    guiSetEnabled ( mainBackgroundLabel, false ) 
    return mainBackground 
end 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
  
  
GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) 
GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) 
guiSetVisible (GUIEditor_Window[1], false) 
guiSetVisible (GUIEditor_Window[2], false) 
Background = guiCreateButton(255,70,90,30,"Background",false,GUIEditor_Window[1]) 
  
local load = false 
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == Background then 
                        guiStaticImageLoadImage(mainBackground,load and "Back1.png" or "Back2.png")     
            load = not load 
        end 
    end 
) 

جربةة

اذا حذفت

GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) 

يشتغل

واذا حطيتها يصير بس يغير النافذه 2 والاولى ما تتغير

Link to comment

تقريبا لان الزر للنافذهـ نفسها حق الـاولى -_-

===============================

جرب #

local load = false 
  
function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) 
    mainBackground = guiCreateStaticImage ( x2, y2, width2, height2,not load and "Back1.png", relative2 ) 
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) 
    guiSetEnabled ( mainBackgroundLabel, false ) 
    setElementID( mainBackground, "gui") 
    return mainBackground 
     
end 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
  
  
GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) 
GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) 
guiSetVisible (GUIEditor_Window[1], false) 
guiSetVisible (GUIEditor_Window[2], false) 
Background = guiCreateButton(255,70,90,30,"Background",false,GUIEditor_Window[1]) 
  
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == Background then 
            guiStaticImageLoadImage(getElementByID("gui"),load and "Back1.png" or "Back2.png")     
            load = not load 
        end 
    end 
) 
  
Link to comment
تقريبا لان الزر للنافذهـ نفسها حق الـاولى -_-

===============================

جرب #

local load = false 
  
function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) 
    mainBackground = guiCreateStaticImage ( x2, y2, width2, height2,not load and "Back1.png", relative2 ) 
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) 
    guiSetEnabled ( mainBackgroundLabel, false ) 
    setElementID( mainBackground, "gui") 
    return mainBackground 
     
end 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
  
  
GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) 
GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) 
guiSetVisible (GUIEditor_Window[1], false) 
guiSetVisible (GUIEditor_Window[2], false) 
Background = guiCreateButton(255,70,90,30,"Background",false,GUIEditor_Window[1]) 
  
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == Background then 
            guiStaticImageLoadImage(getElementByID("gui"),load and "Back1.png" or "Back2.png")     
            load = not load 
        end 
    end 
) 
  

العكس ^^

صارت النافذه الاولى تتغير والثانيه لآ

Link to comment

local load = false 
  
function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) 
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2,not load and "Back1.png", relative2 ) 
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) 
    guiSetEnabled ( mainBackgroundLabel, false ) 
    return mainBackground 
end 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
  
  
GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) 
GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetVisible(GUIEditor_Window[2],false) 
Background = guiCreateButton(300,10,90,30,"Background",false,GUIEditor_Window[1]) 
  
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == Background then 
            for i = 1, 2 do  
                guiStaticImageLoadImage(GUIEditor_Window[i],load and "Back1.png" or "Back2.png")  
            end  
            load = not load          
        end 
    end 
) 
  
Link to comment
local load = false 
  
function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) 
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2,not load and "Back1.png", relative2 ) 
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) 
    guiSetEnabled ( mainBackgroundLabel, false ) 
    return mainBackground 
end 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
  
  
GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) 
GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetVisible(GUIEditor_Window[2],false) 
Background = guiCreateButton(300,10,90,30,"Background",false,GUIEditor_Window[1]) 
  
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == Background then 
            for i = 1, 2 do  
                guiStaticImageLoadImage(GUIEditor_Window[i],load and "Back1.png" or "Back2.png")  
            end  
            load = not load          
        end 
    end 
) 
  

ضبطت يعطيك العافييهه

لو عندي اكثر من نافذه اسويها كذا :

local load = false 
  
function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) 
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2,not load and "Back1.png", relative2 ) 
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) 
    guiSetEnabled ( mainBackgroundLabel, false ) 
    return mainBackground 
end 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
  
  
GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) 
GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetVisible(GUIEditor_Window[2],false) 
Background = guiCreateButton(300,10,90,30,"Background",false,GUIEditor_Window[1]) 
  
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == Background then 
            for i = 1, 2, 3 do 
                guiStaticImageLoadImage(GUIEditor_Window[i],load and "Back1.png" or "Back2.png") 
            end  
            load = not load         
        end 
    end 
) 
  

التغيير هنا

            for i = 1, 2, 3 do 

Link to comment

بعد التعقيد :lol:

ابي افهم شيء وآحد ,,

function teamName ( source, key, newTeamName ) 
    local playerTeam = getPlayerTeam ( source )          -- get the player's team 
    if ( playerTeam ) then                               -- if he's on a team 
        local oldTeamName = getTeamName ( playerTeam )   -- get the team's current name 
        setTeamName ( playerTeam, newTeamName )          -- change its name 
        outputChatBox ( "Changed " .. getPlayerName ( source ).."'s team name from " .. oldTeamName .. " to " .. newTeamName ) 
    else 
        outputChatBox ( getPlayerName ( source ) .. " isn't on a team" ) 
    end 
end 
addCommandHandler ( "teamname", teamName ) 

الزبدة الي آخذها من ذآ الكود وينهآ !؟

Edit :

aboShanb @

اضهار اسم التيم,,

Edited by Guest
Link to comment
بعد التعقيد :lol:

ابي افهم شيء وآحد ,,

function teamName ( source, key, newTeamName ) 
    local playerTeam = getPlayerTeam ( source )          -- get the player's team 
    if ( playerTeam ) then                               -- if he's on a team 
        local oldTeamName = getTeamName ( playerTeam )   -- get the team's current name 
        setTeamName ( playerTeam, newTeamName )          -- change its name 
        outputChatBox ( "Changed " .. getPlayerName ( source ).."'s team name from " .. oldTeamName .. " to " .. newTeamName ) 
    else 
        outputChatBox ( getPlayerName ( source ) .. " isn't on a team" ) 
    end 
end 
addCommandHandler ( "teamname", teamName ) 

الزبدة الي آخذها من ذآ الكود وينهآ !؟

انت قصصدكك من ذا الكود وش تبي تاخذ منه ..

اضهار اسم التيم ولا تغيير التيم ولا شنو ؟

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