CRoW,,# Posted May 9, 2013 Share Posted May 9, 2013 (edited) 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 May 9, 2013 by Guest Link to comment
iMr.Dawix~# Posted May 9, 2013 Share Posted May 9, 2013 جرب 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
CRoW,,# Posted May 9, 2013 Author Share Posted May 9, 2013 جرب 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
iPrestege Posted May 9, 2013 Share Posted May 9, 2013 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
CRoW,,# Posted May 9, 2013 Author Share Posted May 9, 2013 برضو ما ضبط 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
iPrestege Posted May 9, 2013 Share Posted May 9, 2013 شغال تمام انت الجداول عندك معرفة؟ Link to comment
iMr.Dawix~# Posted May 9, 2013 Share Posted May 9, 2013 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
iPrestege Posted May 9, 2013 Share Posted May 9, 2013 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
PaiN^ Posted May 9, 2013 Share Posted May 9, 2013 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
CRoW,,# Posted May 9, 2013 Author Share Posted May 9, 2013 (edited) شغال تمام انت الجداول عندك معرفة؟ تقصد GUIEditor_Label = {} يب معرف Edited May 9, 2013 by Guest Link to comment
iPrestege Posted May 9, 2013 Share Posted May 9, 2013 شغال تمام انت الجداول عندك معرفة؟ تقصد GUIEditor_Label = {} يب معرف والله ي اخوك جربتة تمام معي ~ تأكد من الميتآ؟ Link to comment
CRoW,,# Posted May 9, 2013 Author Share Posted May 9, 2013 خلاص ضبط بس الزر حق تلوين السيارة ماهوب راضي يظهر Link to comment
فاّرس Posted May 9, 2013 Share Posted May 9, 2013 خلاص ضبط بس الزر حق تلوين السيارةماهوب راضي يظهر تأكد من احداثياتك Link to comment
CRoW,,# Posted May 9, 2013 Author Share Posted May 9, 2013 خلاص ضبط بس الزر حق تلوين السيارةماهوب راضي يظهر تأكد من احداثياتك خلاص طلع بس السيارة تتلون ممثل الفلاش Link to comment
CRoW,,# Posted May 9, 2013 Author Share Posted May 9, 2013 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
iPrestege Posted May 9, 2013 Share Posted May 9, 2013 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
CRoW,,# Posted May 9, 2013 Author Share Posted May 9, 2013 طيب اذا بغيت اعكس العملية بحيث اذا ضغط ع الزر مرة ثانية يوقف انا سويتهه كذا بس ما ضبط 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
CRoW,,# Posted May 9, 2013 Author Share Posted May 9, 2013 ^ السيارة ما تيج مثل الفلاش * خلاص مابي السيارة ابيهه اذا ضغط ع نفس الزر يلغي الوظيفةة Link to comment
iPrestege Posted May 9, 2013 Share Posted May 9, 2013 لم يتم التجربة 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
CRoW,,# Posted May 9, 2013 Author Share Posted May 9, 2013 لم يتم التجربة 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
PaiN^ Posted May 9, 2013 Share Posted May 9, 2013 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now