Jump to content

زر دون الضغط عليه !


Recommended Posts

ططآلع الويكي :
guiCreateStaticImage ( x, y, width, height, path, relative, [ parent = nil ] ) 

الكود الاول مثآل ,الكود الثآني الطريقه الصحيحه

GUIEditor_Button[1] = guiCreateStaticImage( 606, 299, 95, 26, "Example.png", false, Win2 ) 
GUIEditor_Button[1] = guiCreateStaticImage( 606, 299, 95, 26, "imgname.imgtype", false, Win2 ) 

بس الككلام الي بالزر يروحح!

شوف شوب تآبل !

آبي يكون مثثله

Link to comment
  • Replies 168
  • Created
  • Last Reply

Top Posters In This Topic

+ قبل كتابه تمت الافاده

آنآ قصدت مو تطلع نآفذه يعني مثل شوب آبو زهره

تضغط على الزر يجيك الكلام ع اليمين

وش المطلوب وضح ؟

اقصصدد

يعني نقول الزر على اليمين

مثلا هو زر info

يطلع لك معلومات اللآعب

تضغط على الزر يطلع لك اسم اللاعب والبنق ...الخ

وتكون كلها ذي على اليسآر

FJvr1.jpg

^^

Link to comment

وش المشكله بالكود ؟؟

addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
    
GUIEditor_Window = {} 
GUIEditor_Label = {} 
GUIEditor_Button = {} 
GUIEditor_Image = {} 
  
Win = guiCreateWindow(0.8225,0.29,0.1762,0.3767,"MyWin",true) 
  
GUIEditor_Button[1] = guiCreateButton(0.8325,0.3383,0.1488,0.0383,"Info",true,Win) 
  
GUIEditor_Button[2] = guiCreateButton(0.8363,0.4117,0.1437,0.0383,"Info2",true,Win) 
  
GUIEditor_Button[3] = guiCreateButton(0.8375,0.4733,0.1425,0.035,"Info3",true,Win) 
  
GUIEditor_Button[4] = guiCreateButton(0.84,0.53,0.1425,0.0383,"Info5",true,Win) 
  
GUIEditor_Button[5] = guiCreateButton(0.8413,0.595,0.14,0.035,"Info6",true,Win) 
  
Win2 = guiCreateWindow(0.3425,0.16,0.3,0.5283,"MyWin2",true) 
  
function VisibleWindow( ) 
    guiSetVisible( Win2, not guiGetVisible( Win2 ) ) 
end 
addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) 
  
GUIEditor_Label[1] = guiCreateLabel(0.3525,0.2017,0.2637,0.035,"Your Name : ",true,Win2) 
  
GUIEditor_Label[2] = guiCreateLabel(0.355,0.2617,0.2525,0.0333,"Your Ping : ",true,Win2) 
guiLabelSetColor(GUIEditor_Label[2],10,10,255) 
  
GUIEditor_Label[3] = guiCreateLabel(0.7487,0.265,0.0063,0.0083,"",true,Win2) 
  
GUIEditor_Label[4] = guiCreateLabel(0.3537,0.3117,0.2575,0.03,"Your Money : ",true,Win2) 
guiLabelSetColor(GUIEditor_Label[4],255,255,4) 
  
GUIEditor_Label[5] = guiCreateLabel(0.3562,0.3617,0.2713,0.0283,"Your Serial : ",true,Win2) 
guiLabelSetColor(GUIEditor_Label[5],,255,255,1) 
  
GUIEditor_Label[6] = guiCreateLabel(0.355,0.415,0.27,0.0317,"Your IP : nil",true,Win2) 
  
GUIEditor_Label[7] = guiCreateLabel(0.3562,0.47,0.27,0.035,"Your Wanted Level :",true,Win2) 
  
GUIEditor_Label[8] = guiCreateLabel(0.355,0.5217,0.235,0.0317,"Your Armor : ",true,Win2) 
  
GUIEditor_Label[9] = guiCreateLabel(0.355,0.575,0.27,0.09,"Info..2",true,Win2) 
guiSetFont(GUIEditor_Label[9],"sa-header") 
  
Win3 = guiCreateWindow(0.2862,0.1017,0.3613,0.7217,"MyWin3",true) 
  
function VisibleWindow( ) 
    guiSetVisible( Win3, not guiGetVisible( Win3 ) ) 
end 
addEventHandler( 'onClientMouseEnter', GUIEditor_Button[2], VisibleWindow, false ) 
  
GUIEditor_Button[1] = guiCreateButton(0.5387,0.2767,0.0938,0.0433,"200",true) 
  
GUIEditor_Button[2] = guiCreateButton(0.545,0.5,0.0887,0.04,"300",true) 
  
GUIEditor_Button[3] = guiCreateButton(0.5487,0.7267,0.0787,0.0417,"400",true) 
  
GUIEditor_Button[4] = guiCreateButton(0.3187,0.2717,0.0862,0.0367,"500",true) 
  
GUIEditor_Button[5] = guiCreateButton(0.32,0.4917,0.085,0.0383,"600",true) 
  
GUIEditor_Button[6] = guiCreateButton(0.3225,0.715,0.085,0.04,"700",true) 
  
GUIEditor_Label[1] = guiCreateLabel(0.4,0.7633,0.1388,0.0433,"info3",true) 
  
GUIEditor_Image[1] = guiCreateStaticImage(0.535,0.1567,0.1013,0.1067,"images/1.png",true) 
guiSetAlpha(GUIEditor_Image[1],1) 
  
GUIEditor_Image[2] = guiCreateStaticImage(0.5412,0.3633,0.0938,0.1217,"images/2.png",true) 
guiSetAlpha(GUIEditor_Image[2],1) 
  
GUIEditor_Image[3] = guiCreateStaticImage(0.545,0.5883,0.09,0.1233,"images/3.png",true) 
  
GUIEditor_Image[4] = guiCreateStaticImage(0.3137,0.1617,0.0938,0.1033,"images/4.png",true) 
  
GUIEditor_Image[5] = guiCreateStaticImage(0.3162,0.3617,0.095,0.12,"images/5.png",true) 
  
GUIEditor_Image[6] = guiCreateStaticImage(0.3212,0.5833,0.0862,0.1217,"images/6.png",true) 
    end 
) 
  
------ 
  
bindKey ( "F5" , "down" , function() 
if ( guiGetVisible ( Win ) == true ) then 
guiSetVisible ( Win ,false ) 
showCursor (false ) 
guiSetInputEnabled(false) 
  
elseif ( guiGetVisible ( Win ) == false ) then 
guiSetVisible ( Win ,true ) 
showCursor (false ) 
guiSetInputEnabled(true) 
playSound("1.wav") 
end 
end 
) 
  

Link to comment
GUIEditor_Window = {} 
GUIEditor_Label = {} 
GUIEditor_Button = {} 
GUIEditor_Image = {} 
  
Win = guiCreateWindow(0.8225,0.29,0.1762,0.3767,"MyWin",true) 
guiSetVisible ( Win, false ) 
GUIEditor_Button[1] = guiCreateButton(0.8325,0.3383,0.1488,0.0383,"Info",true,Win) 
GUIEditor_Button[2] = guiCreateButton(0.8363,0.4117,0.1437,0.0383,"Info2",true,Win) 
GUIEditor_Button[3] = guiCreateButton(0.8375,0.4733,0.1425,0.035,"Info3",true,Win) 
GUIEditor_Button[4] = guiCreateButton(0.84,0.53,0.1425,0.0383,"Info5",true,Win) 
GUIEditor_Button[5] = guiCreateButton(0.8413,0.595,0.14,0.035,"Info6",true,Win) 
  
Win2 = guiCreateWindow(0.3425,0.16,0.3,0.5283,"MyWin2",true) 
guiSetVisible ( Win2, false ) 
GUIEditor_Label[1] = guiCreateLabel(0.3525,0.2017,0.2637,0.035,"Your Name : ",true,Win2) 
GUIEditor_Label[2] = guiCreateLabel(0.355,0.2617,0.2525,0.0333,"Your Ping : ",true,Win2) 
guiLabelSetColor(GUIEditor_Label[2],10,10,255) 
GUIEditor_Label[3] = guiCreateLabel(0.7487,0.265,0.0063,0.0083,"",true,Win2) 
GUIEditor_Label[4] = guiCreateLabel(0.3537,0.3117,0.2575,0.03,"Your Money : ",true,Win2) 
guiLabelSetColor(GUIEditor_Label[4],255,255,4) 
GUIEditor_Label[5] = guiCreateLabel(0.3562,0.3617,0.2713,0.0283,"Your Serial : ",true,Win2) 
guiLabelSetColor(GUIEditor_Label[5],255,255,1) 
GUIEditor_Label[6] = guiCreateLabel(0.355,0.415,0.27,0.0317,"Your IP : nil",true,Win2) 
GUIEditor_Label[7] = guiCreateLabel(0.3562,0.47,0.27,0.035,"Your Wanted Level :",true,Win2) 
GUIEditor_Label[8] = guiCreateLabel(0.355,0.5217,0.235,0.0317,"Your Armor : ",true,Win2)  
GUIEditor_Label[9] = guiCreateLabel(0.355,0.575,0.27,0.09,"Info..2",true,Win2) 
guiSetFont(GUIEditor_Label[9],"sa-header") 
  
Win3 = guiCreateWindow(0.2862,0.1017,0.3613,0.7217,"MyWin3",true) 
guiSetVisible ( Win3, false ) 
GUIEditor_Button[6] = guiCreateButton(0.5387,0.2767,0.0938,0.0433,"200",true,Win3) 
GUIEditor_Button[7] = guiCreateButton(0.545,0.5,0.0887,0.04,"300",true,Win3) 
GUIEditor_Button[8] = guiCreateButton(0.5487,0.7267,0.0787,0.0417,"400",true,Win3) 
GUIEditor_Button[9] = guiCreateButton(0.3187,0.2717,0.0862,0.0367,"500",true,Win3) 
GUIEditor_Button[10] = guiCreateButton(0.32,0.4917,0.085,0.0383,"600",true,Win3) 
GUIEditor_Button[11] = guiCreateButton(0.3225,0.715,0.085,0.04,"700",true,Win3) 
GUIEditor_Label[10] = guiCreateLabel(0.4,0.7633,0.1388,0.0433,"info3",true,Win3) 
GUIEditor_Image[1] = guiCreateStaticImage(0.535,0.1567,0.1013,0.1067,"images/1.png",true,Win3) 
GUIEditor_Image[2] = guiCreateStaticImage(0.5412,0.3633,0.0938,0.1217,"images/2.png",true,Win3) 
GUIEditor_Image[3] = guiCreateStaticImage(0.545,0.5883,0.09,0.1233,"images/3.png",true,Win3) 
GUIEditor_Image[4] = guiCreateStaticImage(0.3137,0.1617,0.0938,0.1033,"images/4.png",true,Win3) 
GUIEditor_Image[5] = guiCreateStaticImage(0.3162,0.3617,0.095,0.12,"images/5.png",true,Win3) 
GUIEditor_Image[6] = guiCreateStaticImage(0.3212,0.5833,0.0862,0.1217,"images/6.png",true,Win3) 
  
------ 
  
addEventHandler ( "onClientMouseEnter", root,   
    function ( ) 
        if source == GUIEditor_Button[1] then 
            guiSetVisible ( Win2, not guiGetVisible ( Win2 ) ) 
        elseif source == GUIEditor_Button[2] then 
            guiSetVisible( Win3, not guiGetVisible ( Win3 ) ) 
        end 
    end 
) 
   
bindKey ( "F5" , "down" ,  
    function ( ) 
        if guiGetVisible ( Win ) then 
            guiSetVisible ( Win, false ) 
            showCursor ( false ) 
            guiSetInputEnabled ( false ) 
        else 
            guiSetVisible ( Win ,true ) 
            showCursor ( false ) 
            guiSetInputEnabled ( true ) 
            playSound ( "1.wav" ) 
        end 
    end 
) 
  

كانت عندكـ فاصلة زائدة في كود تلوين الليبل

و عندكـ اسماء وظائف متشابهة

وايضاً عناصر أزرار متشابهة

مثل هذول :

GUIEditor_Button[1] = guiCreateButton(0.8325,0.3383,0.1488,0.0383,"Info",true,Win) 
GUIEditor_Button[1] = guiCreateButton(0.5387,0.2767,0.0938,0.0433,"200",true) 

Link to comment
GUIEditor_Window = {} 
GUIEditor_Label = {} 
GUIEditor_Button = {} 
GUIEditor_Image = {} 
  
Win = guiCreateWindow(0.8225,0.29,0.1762,0.3767,"MyWin",true) 
guiSetVisible ( Win, false ) 
GUIEditor_Button[1] = guiCreateButton(0.8325,0.3383,0.1488,0.0383,"Info",true,Win) 
GUIEditor_Button[2] = guiCreateButton(0.8363,0.4117,0.1437,0.0383,"Info2",true,Win) 
GUIEditor_Button[3] = guiCreateButton(0.8375,0.4733,0.1425,0.035,"Info3",true,Win) 
GUIEditor_Button[4] = guiCreateButton(0.84,0.53,0.1425,0.0383,"Info5",true,Win) 
GUIEditor_Button[5] = guiCreateButton(0.8413,0.595,0.14,0.035,"Info6",true,Win) 
  
Win2 = guiCreateWindow(0.3425,0.16,0.3,0.5283,"MyWin2",true) 
guiSetVisible ( Win2, false ) 
GUIEditor_Label[1] = guiCreateLabel(0.3525,0.2017,0.2637,0.035,"Your Name : ",true,Win2) 
GUIEditor_Label[2] = guiCreateLabel(0.355,0.2617,0.2525,0.0333,"Your Ping : ",true,Win2) 
guiLabelSetColor(GUIEditor_Label[2],10,10,255) 
GUIEditor_Label[3] = guiCreateLabel(0.7487,0.265,0.0063,0.0083,"",true,Win2) 
GUIEditor_Label[4] = guiCreateLabel(0.3537,0.3117,0.2575,0.03,"Your Money : ",true,Win2) 
guiLabelSetColor(GUIEditor_Label[4],255,255,4) 
GUIEditor_Label[5] = guiCreateLabel(0.3562,0.3617,0.2713,0.0283,"Your Serial : ",true,Win2) 
guiLabelSetColor(GUIEditor_Label[5],255,255,1) 
GUIEditor_Label[6] = guiCreateLabel(0.355,0.415,0.27,0.0317,"Your IP : nil",true,Win2) 
GUIEditor_Label[7] = guiCreateLabel(0.3562,0.47,0.27,0.035,"Your Wanted Level :",true,Win2) 
GUIEditor_Label[8] = guiCreateLabel(0.355,0.5217,0.235,0.0317,"Your Armor : ",true,Win2)  
GUIEditor_Label[9] = guiCreateLabel(0.355,0.575,0.27,0.09,"Info..2",true,Win2) 
guiSetFont(GUIEditor_Label[9],"sa-header") 
  
Win3 = guiCreateWindow(0.2862,0.1017,0.3613,0.7217,"MyWin3",true) 
guiSetVisible ( Win3, false ) 
GUIEditor_Button[6] = guiCreateButton(0.5387,0.2767,0.0938,0.0433,"200",true,Win3) 
GUIEditor_Button[7] = guiCreateButton(0.545,0.5,0.0887,0.04,"300",true,Win3) 
GUIEditor_Button[8] = guiCreateButton(0.5487,0.7267,0.0787,0.0417,"400",true,Win3) 
GUIEditor_Button[9] = guiCreateButton(0.3187,0.2717,0.0862,0.0367,"500",true,Win3) 
GUIEditor_Button[10] = guiCreateButton(0.32,0.4917,0.085,0.0383,"600",true,Win3) 
GUIEditor_Button[11] = guiCreateButton(0.3225,0.715,0.085,0.04,"700",true,Win3) 
GUIEditor_Label[10] = guiCreateLabel(0.4,0.7633,0.1388,0.0433,"info3",true,Win3) 
GUIEditor_Image[1] = guiCreateStaticImage(0.535,0.1567,0.1013,0.1067,"images/1.png",true,Win3) 
GUIEditor_Image[2] = guiCreateStaticImage(0.5412,0.3633,0.0938,0.1217,"images/2.png",true,Win3) 
GUIEditor_Image[3] = guiCreateStaticImage(0.545,0.5883,0.09,0.1233,"images/3.png",true,Win3) 
GUIEditor_Image[4] = guiCreateStaticImage(0.3137,0.1617,0.0938,0.1033,"images/4.png",true,Win3) 
GUIEditor_Image[5] = guiCreateStaticImage(0.3162,0.3617,0.095,0.12,"images/5.png",true,Win3) 
GUIEditor_Image[6] = guiCreateStaticImage(0.3212,0.5833,0.0862,0.1217,"images/6.png",true,Win3) 
  
------ 
  
addEventHandler ( "onClientMouseEnter", root,   
    function ( ) 
        if source == GUIEditor_Button[1] then 
            guiSetVisible ( Win2, not guiGetVisible ( Win2 ) ) 
        elseif source == GUIEditor_Button[2] then 
            guiSetVisible( Win3, not guiGetVisible ( Win3 ) ) 
        end 
    end 
) 
   
bindKey ( "F5" , "down" ,  
    function ( ) 
        if guiGetVisible ( Win ) then 
            guiSetVisible ( Win, false ) 
            showCursor ( false ) 
            guiSetInputEnabled ( false ) 
        else 
            guiSetVisible ( Win ,true ) 
            showCursor ( false ) 
            guiSetInputEnabled ( true ) 
            playSound ( "1.wav" ) 
        end 
    end 
) 
  

كانت عندكـ فاصلة زائدة في كود تلوين الليبل

و عندكـ اسماء وظائف متشابهة

وايضاً عناصر أزرار متشابهة

مثل هذول :

GUIEditor_Button[1] = guiCreateButton(0.8325,0.3383,0.1488,0.0383,"Info",true,Win) 
GUIEditor_Button[1] = guiCreateButton(0.5387,0.2767,0.0938,0.0433,"200",true) 

يعطيك الف عافيه

شغآل 100%

+

لاهنت ابي كود الي يخلي الكلام يرمز يطلع في الوان كثير تتحرك

+

آبي كود اذا مريت على شيء مثلا Info

يطلع لك

ابيض فوق ومكتوب معلومات

Link to comment

لاهنت ابي كود الي يخلي الكلام يرمز يطلع في الوان كثير تتحرك

جرب /

  
function Color ( ) 
 guiLabelSetColor ( Label, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) 
end  
setTimer ( Color, 300, 0 ) 

الابيض وكذا اسمة ToolTips

ومثآل علية /

setElementData(GuiElement, "tooltip-text", "Text", false) 
  

ولآزم تركب المود اللي عطاك اياهـ عاشق ( =

Link to comment

لاهنت ابي كود الي يخلي الكلام يرمز يطلع في الوان كثير تتحرك

guiLabelSetColor 
math.random 
setTimer 

كذآ صح ؟

GUIEditor_Label[1] = guiCreateLabel(23,312,310,52,"Test",false,MyWin) 
function changeLabelColor ( )  
guiLabelSetColor ( GUIEditor_Label[1], math.random(0, 255), math.random(0, 255), math.random(0, 255) )  
end  

Edited by Guest
Link to comment

لاهنت ابي كود الي يخلي الكلام يرمز يطلع في الوان كثير تتحرك

guiLabelSetColor 
math.random 
setTimer 

كذآ صح ؟

GUIEditor_Label[1] = guiCreateLabel(23,312,310,52,"Test",false,GUIEditor_Window[1]) 
function changeLabelColor ( )  
guiLabelSetColor ( GUIEditor_Label[1], math.random(0, 255), math.random(0, 255), math.random(0, 255) )  
end  

ناقصك التايمر !

شف ردي فوق ^

Link to comment
setElementData(GuiElement, "tooltip-text", "Text", false) 
  

GuiElement = الزر او اللبل او او ذذ

Text = الكلام

كذآ يصير ؟

setElementData(playerName, "tooltip-text", "اسمك", false) 

PlayerName= لبل ولا وش وضعه ؟

ايه لبل ...!

انا سويتها زي كذا

setElementData(playerName, "tooltip-text", "اسمك", false) 

وضبطت وطفيت المود وشغلته راحتت ....

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