Jump to content

admin panel change skin


fsdfdsf

Recommended Posts

ع ما اعتقد هذا ما يغير بالاكواد يغير ملفات باللعبة مو متاكد من صحة الامر

بس في طريقة ثاني اللي هي

function guiCreateButton ( ... ) 
      return guiCreateStaticImage ( ... ) 
end 

او شف هذا يفيدكـ :

جرب كذا ولا تنسى تحط اسم ومسار الصورة .. :

local OrginalImage = "" --- الصورة الاصلية # 
local onEnter = "" --- عند دخول المؤشر # 
local onClick = "" --- عند الضغط على الصورة # 
  
addEventHandler ( "onClientResourceStart", resourceRoot, function (    ) 
   for _,guiElements in ipairs ( getElementsByType ( "gui-button", resourceRoot ) ) do 
     local _x, _y = guiGetPosition ( guiElements, false ) 
     local _w,  _h = guiGetSize ( guiElements, false ) 
     replaceimage = guiCreateStaticImage( _x, _y, _w,  _h, OrginalImage, false, getElementParent ( guiElements ) ) 
     if ( replaceimage ) then 
         guiSetAlpha ( guiElements, 0 ) 
         addEventHandler( "onClientMouseEnter", replaceimage, function (   ) 
            guiStaticImageLoadImage ( replaceimage, onEnter ) 
        end, false ) 
        addEventHandler( "onClientMouseLeave", replaceimage, function (   ) 
            guiStaticImageLoadImage ( replaceimage, OrginalImage ) 
        end, false ) 
        addEventHandler( "onClientGUIClick", replaceimage, function (   ) 
            guiStaticImageLoadImage ( replaceimage, onClick ) 
         end, false ) 
      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...