Jump to content

مشككلهه


Recommended Posts

السلام عليكم

انا عندي مشكلة

سويت كذا

function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) 
  local mainBackground = guiCreateStaticImage(x2, y2, width2, height2, "window.png", relative2) 
  local mainBackgroundLabel = guiCreateLabel(0, 0, 0, 0, titleBarText2, false, mainBackground) 
  guiSetEnabled(mainBackgroundLabel, false) 
  return mainBackground 
end 
  
function guiCreateButton( x2, y2, width2, height2, titleBarText2, relative2, ksa ) 
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Button.png", relative2, ksa ) 
local w, h = guiGetSize ( mainBackground, false ) 
    local mainBackgroundLabel = guiCreateLabel ( x2, y2, w, h, titleBarText2, false, mainBackground ) 
    guiSetFont ( mainBackgroundLabel, font ) 
    guiSetEnabled ( mainBackgroundLabel, false ) 
     guiLabelSetHorizontalAlign(mainBackgroundLabel, "center") 
     guiLabelSetVerticalAlign(mainBackgroundLabel, "center") 
       guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) 
addEventHandler( "onClientMouseEnter", root, 
function () 
    if source == mainBackground then 
            guiStaticImageLoadImage(mainBackground,"Button2.png") 
     guiLabelSetColor(mainBackgroundLabel, 255, 0, 0) 
        playSoundFrontEnd ( 3) 
    end 
end) 

المشكلة ههي ان التكست الي بالبتون ماتجي تجي صورة فاضيية

Link to comment

كامل واستبدله بـ ذا guiCreateButton امسح فنكشن

function guiCreateButton( x2, y2, width2, height2, titleBarText2, relative2, ksa ) 
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Button.png", relative2, ksa ) 
    local w, h = guiGetSize ( mainBackground, false ) 
    local mainBackgroundLabel = guiCreateLabel ( x2, y2, w, h, titleBarText2, false, mainBackground ) 
    guiSetFont ( mainBackgroundLabel, font ) 
    guiSetEnabled ( mainBackgroundLabel, false ) 
    guiLabelSetHorizontalAlign(mainBackgroundLabel, "center") 
    guiLabelSetVerticalAlign(mainBackgroundLabel, "center") 
    guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) 
end 
Link to comment

addEventHandler ( 'onClientResourceStart', resourceRoot, 
function  ( ) 
mainBackground = guiCreateStaticImage( 20, 200, 100, 100, "window.png", false ) 
Label = guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,mainBackground) 
guiSetEnabled(Label, false) 
guiSetFont (Label, "default-normal") 
guiLabelSetHorizontalAlign(Label, "center") 
guiLabelSetVerticalAlign(Label, "center") 
guiLabelSetColor( Label, 255, 0, 0 ) 
  end 
) 
  
addEventHandler( "onClientMouseEnter", resourceRoot, 
function () 
    if ( localPlayer == mainBackground ) then 
     guiStaticImageLoadImage(mainBackground,"Button2.png") 
     guiLabelSetColor(Label, 255, 0, 0) 
     playSoundFrontEnd ( 3) 
   end 
end 
) 
Edited by Guest
Link to comment
addEventHandler ( 'onClientResourceStart', resourceRoot, 
function  ( ) 
mainBackground = guiCreateStaticImage( 20, 200, 100, 100, "window.png", false ) 
Label = guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,mainBackground) 
guiSetEnabled(Label, false) 
guiSetFont (Label, font ) 
guiLabelSetHorizontalAlign(Label, "center") 
guiLabelSetVerticalAlign(Label, "center") 
guiLabelSetColor( Label, 255, 0, 0 ) 
  end 
) 
  
addEventHandler( "onClientMouseEnter", resourceRoot, 
function () 
    if ( localPlayer == mainBackground ) then 
     guiStaticImageLoadImage(mainBackground,"Button2.png") 
     guiLabelSetColor(Label, 255, 0, 0) 
     playSoundFrontEnd ( 3) 
   end 
end 
) 

مين قالك هو بسوي هيك

تفضل جرب

function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) 
  local mainBackground = guiCreateStaticImage(x2, y2, width2, height2, "window.png", relative2) 
  local mainBackgroundLabel = guiCreateLabel(0, 0, 0, 0, titleBarText2, false, mainBackground) 
  guiSetEnabled(mainBackgroundLabel, false) 
  return mainBackground 
end 
  
function guiCreateButton( x2, y2, width2, height2, titleBarText2, relative2, ksa ) 
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Button.png", relative2, ksa ) 
    local w, h = guiGetSize ( mainBackground, false ) 
    local mainBackgroundLabel = guiCreateLabel ( x2, y2, w, h, titleBarText2, false, mainBackground ) 
    guiSetFont ( mainBackgroundLabel, font ) 
    guiSetEnabled ( mainBackgroundLabel, false ) 
    guiLabelSetHorizontalAlign(mainBackgroundLabel, "center") 
    guiLabelSetVerticalAlign(mainBackgroundLabel, "center") 
    guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) 
end 
        
addEventHandler( "onClientMouseEnter", root, 
function () 
    if source == mainBackground then 
        guiStaticImageLoadImage(mainBackground,"Button2.png") 
        guiLabelSetColor(mainBackgroundLabel, 255, 0, 0) 
        playSoundFrontEnd ( 3) 
    end 
end) 

Edited by Guest
Link to comment
addEventHandler ( 'onClientResourceStart', resourceRoot, 
function  ( ) 
mainBackground = guiCreateStaticImage( 20, 200, 100, 100, "window.png", false ) 
Label = guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,mainBackground) 
guiSetEnabled(Label, false) 
guiSetFont (Label, font ) 
guiLabelSetHorizontalAlign(Label, "center") 
guiLabelSetVerticalAlign(Label, "center") 
guiLabelSetColor( Label, 255, 0, 0 ) 
  end 
) 
  
addEventHandler( "onClientMouseEnter", resourceRoot, 
function () 
    if ( localPlayer == mainBackground ) then 
     guiStaticImageLoadImage(mainBackground,"Button2.png") 
     guiLabelSetColor(Label, 255, 0, 0) 
     playSoundFrontEnd ( 3) 
   end 
end 
) 

مين قالك خو بسوي هيك

تفضل جرب

function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) 
  local mainBackground = guiCreateStaticImage(x2, y2, width2, height2, "window.png", relative2) 
  local mainBackgroundLabel = guiCreateLabel(0, 0, 0, 0, titleBarText2, false, mainBackground) 
  guiSetEnabled(mainBackgroundLabel, false) 
  return mainBackground 
end 
  
function guiCreateButton( x2, y2, width2, height2, titleBarText2, relative2, ksa ) 
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Button.png", relative2, ksa ) 
    local w, h = guiGetSize ( mainBackground, false ) 
    local mainBackgroundLabel = guiCreateLabel ( x2, y2, w, h, titleBarText2, false, mainBackground ) 
    guiSetFont ( mainBackgroundLabel, font ) 
    guiSetEnabled ( mainBackgroundLabel, false ) 
    guiLabelSetHorizontalAlign(mainBackgroundLabel, "center") 
    guiLabelSetVerticalAlign(mainBackgroundLabel, "center") 
    guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) 
end 
        
addEventHandler( "onClientMouseEnter", root, 
function () 
    if source == mainBackground then 
        guiStaticImageLoadImage(mainBackground,"Button2.png") 
        guiLabelSetColor(mainBackgroundLabel, 255, 0, 0) 
        playSoundFrontEnd ( 3) 
    end 
end) 

باراميتر الصورة المطلوب 6

ممن وين جبت ksa ?

Link to comment

هذا كودي بدون اي تعديل

نسيت احط onClientMouseLeave

    function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) 
      local mainBackground = guiCreateStaticImage(x2, y2, width2, height2, "window.png", relative2) 
      local mainBackgroundLabel = guiCreateLabel(0, 0, 0, 0, titleBarText2, false, mainBackground) 
      guiSetEnabled(mainBackgroundLabel, false) 
      return mainBackground 
    end 
      
    function guiCreateButton( x2, y2, width2, height2, titleBarText2, relative2, ksa ) 
        local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Button.png", relative2, ksa ) 
        local w, h = guiGetSize ( mainBackground, false ) 
        local mainBackgroundLabel = guiCreateLabel ( x2, y2, w, h, titleBarText2, false, mainBackground ) 
        guiSetFont ( mainBackgroundLabel, font ) 
        guiSetEnabled ( mainBackgroundLabel, false ) 
        guiLabelSetHorizontalAlign(mainBackgroundLabel, "center") 
        guiLabelSetVerticalAlign(mainBackgroundLabel, "center") 
        guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) 
    end 
            
    addEventHandler( "onClientMouseEnter", root, 
    function () 
        if source == mainBackground then 
            guiStaticImageLoadImage(mainBackground,"Button2.png") 
            guiLabelSetColor(mainBackgroundLabel, 255, 0, 0) 
            playSoundFrontEnd ( 3) 
        end 
    end) 
  
addEventHandler( "onClientGUIClick", root, 
function () 
    if source == mainBackground then 
        playSoundFrontEnd ( 19) 
    end 
end) 
  
addEventHandler( "onClientMouseLeave", root, 
function () 
    if source == mainBackground then 
                guiStaticImageLoadImage(mainBackground,"File/Button.png") 
       guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 )    
    end 
end) 
    return mainBackground 

الاكواد حقتكم كل شوي يطلع مشكلة عند end واحذفها ثم يقول خطاء عند النافذه

Link to comment

addEventHandler ( 'onClientResourceStart', resourceRoot, 
function  ( ) 
mainBackground = guiCreateStaticImage( 20, 200, 100, 100, "window.png", false ) 
local mainBackground2 = guiCreateStaticImage ( 20, 200, 100, 100, "Button.png", false) 
Label = guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,mainBackground) 
guiSetEnabled(Label, false) 
guiSetFont (Label, "default-normal") 
guiLabelSetHorizontalAlign(Label, "center") 
guiLabelSetVerticalAlign(Label, "center") 
guiLabelSetColor( Label, 255, 0, 0 ) 
  end 
) 
  
addEventHandler( "onClientMouseEnter", resourceRoot, 
function () 
    if ( localPlayer == mainBackground ) then 
     guiStaticImageLoadImage(mainBackground,"Button2.png") 
     guiLabelSetColor(Label, 255, 0, 0) 
     playSoundFrontEnd ( 3) 
   end 
end 
) 
  
addEventHandler( "onClientGUIClick", resourceRoot, 
function ( ) 
    if (localPlayer == mainBackground ) then 
        playSoundFrontEnd ( 19) 
    end 
end) 
  
  
addEventHandler( "onClientMouseLeave", resourceRoot, 
function ( ) 
    if (localPlayer == mainBackground ) then 
        guiStaticImageLoadImage(mainBackground,"File/Button.png") 
       guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 )    
    end 
end) 

تأكد الكود كلينت . .

+

اذا الصور كلها في مجلد اسمه

File

لازم كل الصور تسوي لهم

File/'Button1'

File/'Button2'

... الخ

+ ياليت تستخدم الديبق وتقول لي وش يطلع لك اخطاء من كودي . .

Edited by Guest
Link to comment
شكلهه مهو زابط خلاصص ماعاد ابي اسويهه

مششكورين

اضغط السكربت وارفعه على موقع مع الصور وانا بضبطه لك وبرسله لك لاني ماعرف كم تبي صور

+ الفائدة من المود

ارسلي السكربت خاص اذا ماتقدر تحطه هنا

Link to comment
if ( localPlayer == mainBackground ) then !!!! ؟

طيب ذا اذا الاعب ضغط على الخلفيه ؟

وش فيه

كانك مسوي

if source == .. .

انت فاهم السورس خطأ

كل حدث يفرق عن الثاني وراجع الويكي عشان تعرف ايش السورس لحدث معين

هو الشي الي انضغط عليه و ليس الاعب الي ضغط على الشي onClientGUIClick السورس في الحدث

و اصلاً ما يصير اساساً تقارن لاعب ب زر

يعني يصير مثلاً تقارن ماكس == خلفية؟

انت خلفية؟ هههههه

Link to comment
if ( localPlayer == mainBackground ) then !!!! ؟

طيب ذا اذا الاعب ضغط على الخلفيه ؟

وش فيه

كانك مسوي

if source == .. .

انت فاهم السورس خطأ

كل حدث يفرق عن الثاني وراجع الويكي عشان تعرف ايش السورس لحدث معين

هو الشي الي انضغط عليه و ليس الاعب الي ضغط على الشي onClientGUIClick السورس في الحدث

و اصلاً ما يصير اساساً تقارن لاعب ب زر

يعني يصير مثلاً تقارن ماكس == خلفية؟

انت خلفية؟ هههههه

اها , واضح الحين

الله يعطيك العافية تبوله ماقصرت :)

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