Jump to content

! وش الخطا بالكود|thx To Mr.Pres[T]ege


Recommended Posts

wnd = guiCreateWindow(0.2537,0.2183,0.4812,0.4967,"",true) 
guiSetAlpha(wnd,1) 
GUIEditor_Label[5] = guiCreateLabel(131,28,154,45,"Color System",false,wnd) 
GUIEditor_Button[1] = guiCreateButton(9,105,111,35,"تلوين البحر",false,wnd) 
GUIEditor_Button[2] = guiCreateButton(235,105,111,35,"تلوين السماء",false,wnd) 
GUIEditor_Button[3] = guiCreateButton(130,197,111,35,"تلوين الموتر",false,wnd) 
guiSetVisible (wnd, false)   
function OpenWin() 
    if guiGetVisible ( wnd ) then 
       guiSetVisible ( wnd, false ) 
       showCursor(false) 
       guiSetInputEnabled(false) 
    else 
        guiSetVisible ( wnd, true ) 
        showCursor(true) 
        guiSetInputEnabled(true) 
  
    end 
end 
bindKey("F2", "down", OpenWin) 
  
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 
addEventHandler("onClientGUIClick", root, 
    function ( ) 
        if source == GUIEditor_Button[2] then   
        theTimer = setTimer(function() 
            setSkyGradient(math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255)) 
end, 350,0) 
       elseif ( source == GUIEditor_Button[1] ) then 
        theT = setTimer(function() 
            setWaterColor(math.random(255),math.random(255), math.random(255)) 
end, 350,0) 
 elseif ( source == GUIEditor_Button[3] ) then 
       function uPlayer() 
        if isPedInVehicle( uPlayer ) then 
            local uVehicle = getPedOccupiedVehicle( uPlayer ) 
            if uVehicle then 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                setVehicleColor( uVehicle, r, g, b ) 
            end 
        end 
) 

وش الخطا بذا الكود

Edited by Guest
Link to comment
  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

جرب :fadein:

wnd = guiCreateWindow(0.2537,0.2183,0.4812,0.4967,"",false) 
guiSetAlpha(wnd,1) 
GUIEditor_Label[5] = guiCreateLabel(131,28,154,45,"Color System",false,wnd) 
GUIEditor_Button[1] = guiCreateButton(9,105,111,35,"تلوين البحر",false,wnd) 
GUIEditor_Button[2] = guiCreateButton(235,105,111,35,"تلوين السماء",false,wnd) 
GUIEditor_Button[3] = guiCreateButton(130,197,111,35,"تلوين الموتر",false,wnd) 
guiSetVisible (wnd, false)   
function OpenWin() 
    if guiGetVisible ( wnd ) then 
       guiSetVisible ( wnd, false ) 
       showCursor(false) 
    else 
        guiSetVisible ( wnd, true ) 
        showCursor(true) 
    end 
end 
bindKey("F2", "down", OpenWin) 
  
addEventHandler("onClientGUIClick", root, 
    function () 
        if source == GUIEditor_Button[2] then   
        theTimer = setTimer(function() 
            setSkyGradient(math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255)) 
end, 350,0) 
       elseif ( source == GUIEditor_Button[1] ) then 
        theT = setTimer(function() 
            setWaterColor(math.random(255),math.random(255), math.random(255)) 
end, 350,0) 
 elseif ( source == GUIEditor_Button[3] ) then 
       function uPlayer() 
        if isPedInVehicle( uPlayer ) then 
            local uVehicle = getPedOccupiedVehicle( uPlayer ) 
            if uVehicle then 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                setVehicleColor( uVehicle, r, g, b ) 
            end 
        end 
    end 
end 
end) 

Link to comment
جرب :fadein:
wnd = guiCreateWindow(0.2537,0.2183,0.4812,0.4967,"",false) 
guiSetAlpha(wnd,1) 
GUIEditor_Label[5] = guiCreateLabel(131,28,154,45,"Color System",false,wnd) 
GUIEditor_Button[1] = guiCreateButton(9,105,111,35,"تلوين البحر",false,wnd) 
GUIEditor_Button[2] = guiCreateButton(235,105,111,35,"تلوين السماء",false,wnd) 
GUIEditor_Button[3] = guiCreateButton(130,197,111,35,"تلوين الموتر",false,wnd) 
guiSetVisible (wnd, false)   
function OpenWin() 
    if guiGetVisible ( wnd ) then 
       guiSetVisible ( wnd, false ) 
       showCursor(false) 
    else 
        guiSetVisible ( wnd, true ) 
        showCursor(true) 
    end 
end 
bindKey("F2", "down", OpenWin) 
  
addEventHandler("onClientGUIClick", root, 
    function () 
        if source == GUIEditor_Button[2] then   
        theTimer = setTimer(function() 
            setSkyGradient(math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255)) 
end, 350,0) 
       elseif ( source == GUIEditor_Button[1] ) then 
        theT = setTimer(function() 
            setWaterColor(math.random(255),math.random(255), math.random(255)) 
end, 350,0) 
 elseif ( source == GUIEditor_Button[3] ) then 
       function uPlayer() 
        if isPedInVehicle( uPlayer ) then 
            local uVehicle = getPedOccupiedVehicle( uPlayer ) 
            if uVehicle then 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                setVehicleColor( uVehicle, r, g, b ) 
            end 
        end 
    end 
end 
end) 

ما ضبط

Link to comment

addEventHandler("onClientGUIClick", root, 
    function () 
        if source == GUIEditor_Button[2] then   
        theTimer = setTimer(function() 
            setSkyGradient(math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255)) 
end, 350,0) 
       elseif ( source == GUIEditor_Button[1] ) then 
        theT = setTimer(function() 
            setWaterColor(math.random(255),math.random(255), math.random(255)) 
end, 350,0) 
 elseif ( source == GUIEditor_Button[3] ) then 
            local uVehicle = getPedOccupiedVehicle( localPlayer ) 
            if uVehicle then 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                setVehicleColor( uVehicle, r, g, b ) 
        end 
    end 
end 
) 

ي طويل العمر مدخل هنا فنكشنين و UPlayer

مو معرف و النافذهـ الرئيسية عدلها اخر شيء بدال

false > true

Link to comment

برضو ما ضبط

wnd = guiCreateWindow(0.2537,0.2183,0.4812,0.4967,"",true) 
guiSetAlpha(wnd,1) 
GUIEditor_Label[5] = guiCreateLabel(131,28,154,45,"Color System",false,wnd) 
GUIEditor_Button[1] = guiCreateButton(9,105,111,35,"تلوين البحر",false,wnd) 
GUIEditor_Button[2] = guiCreateButton(235,105,111,35,"تلوين السماء",false,wnd) 
GUIEditor_Button[3] = guiCreateButton(130,197,111,35,"تلوين الموتر",true,wnd) 
guiSetVisible (wnd, false)   
function OpenWin() 
    if guiGetVisible ( wnd ) then 
       guiSetVisible ( wnd, false ) 
       showCursor(false) 
       guiSetInputEnabled(false) 
    else 
        guiSetVisible ( wnd, true ) 
        showCursor(true) 
        guiSetInputEnabled(true) 
  
    end 
end 
bindKey("F2", "down", OpenWin) 
  
addEventHandler("onClientGUIClick", root, 
    function () 
        if source == GUIEditor_Button[2] then   
        theTimer = setTimer(function() 
            setSkyGradient(math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255)) 
end, 350,0) 
       elseif ( source == GUIEditor_Button[1] ) then 
        theT = setTimer(function() 
            setWaterColor(math.random(255),math.random(255), math.random(255)) 
end, 350,0) 
 elseif ( source == GUIEditor_Button[3] ) then 
            local uVehicle = getPedOccupiedVehicle( localPlayer ) 
            if uVehicle then 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                setVehicleColor( uVehicle, r, g, b ) 
        end 
    end 
end 
) 
  

Link to comment
wnd = guiCreateWindow(0.2537,0.2183,0.4812,0.4967,"",false) 
guiSetAlpha(wnd,1) 
GUIEditor_Label[5] = guiCreateLabel(131,28,154,45,"Color System",false,wnd) 
GUIEditor_Button[1] = guiCreateButton(9,105,111,35,"تلوين البحر",false,wnd) 
GUIEditor_Button[2] = guiCreateButton(235,105,111,35,"تلوين السماء",false,wnd) 
GUIEditor_Button[3] = guiCreateButton(130,197,111,35,"تلوين الموتر",true,wnd) 
guiSetVisible (wnd, false)   
function OpenWin() 
       guiSetVisible ( wnd,not guiGetVisible(wnd)) 
       showCursor(guiGetVisible(wnd)) 
    end 
end 
bindKey("F2", "down", OpenWin) 
  
addEventHandler("onClientGUIClick", root, 
    function () 
        if source == GUIEditor_Button[2] then   
        setTimer(function() 
            setSkyGradient(math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255)) 
end, 350,0) 
       elseif ( source == GUIEditor_Button[1] ) then 
         
setTimer(function() 
            setWaterColor(math.random(255),math.random(255), math.random(255)) 
end, 350,0) 
 elseif ( source == GUIEditor_Button[3] ) then 
            local uVehicle = getPedOccupiedVehicle( localPlayer ) 
            if uVehicle then 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                setVehicleColor(uVehicle, r, g, b ) 
        end 
    end 
end 
) 

Link to comment
wnd = guiCreateWindow(0.2537,0.2183,0.4812,0.4967,"",false) 
guiSetAlpha(wnd,1) 
GUIEditor_Label[5] = guiCreateLabel(131,28,154,45,"Color System",false,wnd) 
GUIEditor_Button[1] = guiCreateButton(9,105,111,35,"تلوين البحر",false,wnd) 
GUIEditor_Button[2] = guiCreateButton(235,105,111,35,"تلوين السماء",false,wnd) 
GUIEditor_Button[3] = guiCreateButton(130,197,111,35,"تلوين الموتر",true,wnd) 
guiSetVisible (wnd, false)   
function OpenWin() 
       guiSetVisible ( wnd,not guiGetVisible(wnd)) 
       showCursor(guiGetVisible(wnd)) 
    end 
end 
bindKey("F2", "down", OpenWin) 
  
addEventHandler("onClientGUIClick", root, 
    function () 
        if source == GUIEditor_Button[2] then   
        setTimer(function() 
            setSkyGradient(math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255)) 
end, 350,0) 
       elseif ( source == GUIEditor_Button[1] ) then 
         
setTimer(function() 
            setWaterColor(math.random(255),math.random(255), math.random(255)) 
end, 350,0) 
 elseif ( source == GUIEditor_Button[3] ) then 
            local uVehicle = getPedOccupiedVehicle( localPlayer ) 
            if uVehicle then 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                setVehicleColor(uVehicle, r, g, b ) 
        end 
    end 
end 
) 

غلط قلت لكم النافذهـ لازم

true .

Link to comment
GUIEditor_Label = { } 
GUIEditor_Button = { } 
  
wnd = guiCreateWindow(0.2537,0.2183,0.4812,0.4967,"",true) 
guiSetAlpha(wnd,1) 
guiSetVisible (wnd, false)   
GUIEditor_Label[5] = guiCreateLabel(131,28,154,45,"Color System",false,wnd) 
GUIEditor_Button[1] = guiCreateButton(9,105,111,35,"تلوين البحر",false,wnd) 
GUIEditor_Button[2] = guiCreateButton(235,105,111,35,"تلوين السماء",false,wnd) 
GUIEditor_Button[3] = guiCreateButton(130,197,111,35,"تلوين الموتر",true,wnd) 
  
function OpenWin() 
    if guiGetVisible ( wnd ) then 
       guiSetVisible ( wnd, false ) 
       showCursor(false) 
       guiSetInputEnabled(false) 
    else 
        guiSetVisible ( wnd, true ) 
        showCursor(true) 
        guiSetInputEnabled(true) 
  
    end 
end 
bindKey("F2", "down", OpenWin) 
  
addEventHandler("onClientGUIClick", root, 
    function () 
        if source == GUIEditor_Button[2] then   
            theTimer = setTimer(function() 
                setSkyGradient(math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255)) 
            end, 350,0) 
        elseif ( source == GUIEditor_Button[1] ) then 
            theT = setTimer(function() 
                setWaterColor(math.random(255),math.random(255), math.random(255)) 
            end, 350,0) 
        elseif ( source == GUIEditor_Button[3] ) then 
            local uVehicle = getPedOccupiedVehicle( localPlayer ) 
            if uVehicle then 
                setVehicleColor( uVehicle, math.random( 255 ), math.random( 255 ), math.random( 255 ) ) 
            end 
        end 
    end 
) 

Link to comment
elseif ( source == GUIEditor_Button[3] ) then 
            theC = setTimer(function() 
            local uVehicle = getPedOccupiedVehicle( localPlayer ) 
            if uVehicle then 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
end, 350,0) 
                setVehicleColor( uVehicle, r, g, b ) 
                 

Link to comment
elseif ( source == GUIEditor_Button[3] ) then 
             uVehicle = getPedOccupiedVehicle( localPlayer ) 
            if uVehicle then 
            theC = setTimer(function() 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                setVehicleColor( uVehicle, r, g, b ) 
            end, 350,0) 

Link to comment

طيب اذا بغيت اعكس العملية

بحيث اذا ضغط ع الزر مرة ثانية يوقف

انا سويتهه كذا بس ما ضبط

addEventHandler("onClientGUIClick", root, 
    function () 
        if source == GUIEditor_Button[2] then   
        theTimer = setTimer(function() 
            setSkyGradient(math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255)) 
end, 350,0) 
elseif ( source == GUIEditor_Button[2] ) then 
if ( isTimer ( theTimer ) ) then  
                killTimer ( theTimer ) 
       elseif ( source == GUIEditor_Button[1] ) then 
        theT = setTimer(function() 
            setWaterColor(math.random(255),math.random(255), math.random(255)) 
end, 350,0) 
elseif ( source == GUIEditor_Button[1] ) then 
if ( isTimer ( theT ) ) then  
                killTimer ( theT ) 
 elseif ( source == GUIEditor_Button[3] ) then 
             uVehicle = getPedOccupiedVehicle( localPlayer ) 
            if uVehicle then 
            theC = setTimer(function() 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                setVehicleColor( uVehicle, r, g, b ) 
            end, 350,0) 
             elseif ( source == GUIEditor_Button[3] ) then 
             if ( isTimer ( theC ) ) then  
                killTimer ( theC) 
                 
        end 
    end 
end 
) 

Link to comment

لم يتم التجربة

  
local ClickedSky = false 
local ClickedSea = false 
local ClickedVehicle = false 
addEventHandler("onClientGUIClick", root, 
    function () 
        if source == GUIEditor_Button[2] then  
            if not ClickedSky then 
        theTimer = setTimer(function() 
       setSkyGradient(math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255)) 
end, 350,0) 
        ClickedSky = not ClickedSky  
    else 
        if ( isTimer ( theTimer ) ) then  
                killTimer ( theTimer )   
                theTimer = nil  
                ClickedSky = not ClickedSky 
            end 
        end 
    elseif ( source ==  GUIEditor_Button[1] ) then 
        if not ClickedSea then 
    theT = setTimer(function() 
            setWaterColor(math.random(255),math.random(255), math.random(255)) 
end, 350,0) 
        ClickedSea = not ClickedSea 
    else 
        if ( isTimer ( theT ) ) then  
         killTimer ( theT )  
        theT = nil  
                ClickedSea = not ClickedSea 
            end 
        end 
    elseif ( source == GUIEditor_Button[3] ) then 
            if not ClickedVehicle then 
             uVehicle = getPedOccupiedVehicle( localPlayer ) 
            if not uVehicle then return end 
            theC = setTimer(function() 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                setVehicleColor( uVehicle, r, g, b ) 
            end, 350,0) 
            ClickedVehicle = not ClickedVehicle 
        else 
        if ( isTimer ( theC ) ) then  
         killTimer ( theC )  
        theC = nil  
                ClickedVehicle = not ClickedVehicle 
            end 
        end 
    end 
end 
) 
Link to comment
لم يتم التجربة

  
local ClickedSky = false 
local ClickedSea = false 
local ClickedVehicle = false 
addEventHandler("onClientGUIClick", root, 
    function () 
        if source == GUIEditor_Button[2] then  
            if not ClickedSky then 
        theTimer = setTimer(function() 
       setSkyGradient(math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255)) 
end, 350,0) 
        ClickedSky = not ClickedSky  
    else 
        if ( isTimer ( theTimer ) ) then  
                killTimer ( theTimer )   
                theTimer = nil  
                ClickedSky = not ClickedSky 
            end 
        end 
    elseif ( source ==  GUIEditor_Button[1] ) then 
        if not ClickedSea then 
    theT = setTimer(function() 
            setWaterColor(math.random(255),math.random(255), math.random(255)) 
end, 350,0) 
        ClickedSea = not ClickedSea 
    else 
        if ( isTimer ( theT ) ) then  
         killTimer ( theT )  
        theT = nil  
                ClickedSea = not ClickedSea 
            end 
        end 
    elseif ( source == GUIEditor_Button[3] ) then 
            if not ClickedVehicle then 
             uVehicle = getPedOccupiedVehicle( localPlayer ) 
            if not uVehicle then return end 
            theC = setTimer(function() 
                local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                setVehicleColor( uVehicle, r, g, b ) 
            end, 350,0) 
            ClickedVehicle = not ClickedVehicle 
        else 
        if ( isTimer ( theC ) ) then  
         killTimer ( theC )  
        theC = nil  
                ClickedVehicle = not ClickedVehicle 
            end 
        end 
    end 
end 
) 

تسسسسسسسسسسلم ضبط

بس تقدر تشرح لي من وين جات ذي الوظائف

لان الكود تغير 360 درجة صرت ماعرف فيهه شي

Link to comment
local flash = false 
local sky = false 
local water = false 
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == GUIEditor_Button[2] then   
            if not sky then 
                theTimer = setTimer( function() 
                    setSkyGradient( math.random(255),math.random(255), math.random(255), math.random(255),math.random(255),math.random(255) ) 
                end, 350, 0 ) 
                sky = not sky 
            else 
                if isTimer ( theTimer ) then 
                    killTimer ( theTimer ) 
                    sky = not sky 
                end 
            end 
        elseif source == GUIEditor_Button[1] then 
            if not water then 
                theT = setTimer ( function() 
                    setWaterColor ( math.random(255),math.random(255), math.random(255) ) 
                end, 350, 0 ) 
                water = not water 
            else 
                if isTimer ( theT ) then 
                    killTimer ( theT ) end 
                    water = not water 
                end 
            end 
        elseif source == GUIEditor_Button[3] then 
            if not flash then 
                uVehicle = getPedOccupiedVehicle( localPlayer ) 
                if uVehicle then 
                    theC = setTimer(function() 
                        local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) 
                        setVehicleColor( uVehicle, r, g, b ) 
                    end, 350,0) 
                    flash = not flash 
            else 
                if isTimer ( theC ) then 
                    killTimer ( theC ) 
                    flash = not flash 
                end 
            end   
        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...