Jump to content

Recommended Posts

وش حل شباب

 

local sx, sy = guiGetScreenSize() 
sx, sy = ( sx / 1280 ), ( sy / 720 )
local alpha = 100
local fadeSpeed = 5

addEventHandler("onClientRender", getRootElement(),
    function()
        if getKeyState("tab") then
            if alpha ~= 0 then alpha = alpha + fadeSpeed end 
            dxDrawRectangle(241*sx, 212*sy, 799*sx, 70*sy, tocolor(0, 254, 144,alpha))
            dxDrawRectangle(241*sx, 282*sy, 799*sx, 232*sy, tocolor(0, 0, 0,alpha))
        end
        if alpha <= 0 then 
            alpha = alpha - fadeSpeed
        end 
    end
)

صممت سكور بورد و ضفته له فتح + فانكشن حق فيد ان/اوت

اللوحه تفتح عادي بس ليش لما ابقى ضاغط علي تاب تفتح وتفتح مره ثانيه؟ شو سالفه

حل تكفون انقهرت منه والله :'(

Edited by liwahadri
Link to comment
19 minutes ago, liwahadri said:

انقهرت

من اللي فهمته

local sx, sy = guiGetScreenSize() 
sx, sy = ( sx / 1280 ), ( sy / 720 )
local alpha = 0
local fadeSpeed = 4

addEventHandler("onClientRender", getRootElement(),
    function()
          		alpha = alpha + fadeSpeed
        if alpha >= 255 then 
            alpha =255
    	end 
    if getKeyState("tab") then
            dxDrawRectangle(241*sx, 212*sy, 799*sx, 70*sy, tocolor(0, 254, 144,alpha))
            dxDrawRectangle(241*sx, 282*sy, 799*sx, 232*sy, tocolor(0, 0, 0,alpha))
        end

    end
)

 

Edited by Master_MTA
Link to comment
Just now, Master_MTA said:

من اللي فهمته


local sx, sy = guiGetScreenSize() 
sx, sy = ( sx / 1280 ), ( sy / 720 )
local alpha = 0
local fadeSpeed = 4

addEventHandler("onClientRender", getRootElement(),
    function()
          		alpha = alpha + fadeSpeed
        if alpha >= 255 then 
            alpha =255
    	end 
    if getKeyState("tab") then
            if alpha ~= 100 then alpha = alpha + fadeSpeed end 
            dxDrawRectangle(241*sx, 212*sy, 799*sx, 70*sy, tocolor(0, 254, 144,alpha))
            dxDrawRectangle(241*sx, 282*sy, 799*sx, 232*sy, tocolor(0, 0, 0,alpha))
        end

    end
)

 

مب كذا الي قصدي انا لو ضغطت علي التاب عشان تفتح سكور بورد اللوحه تفتح وتعيد وتفتح وتعيد نفس شيئ 

Link to comment
Just now, Master_MTA said:

معليش مب فاهم وضح

 

 fade in / outوال bind key انت تعرف سكور بورد الي بسرفرات ؟ اكيد يب اوك انا صممت لوحه سكور بورد ضفته له فانكشن

fade in المشكله اللي صارت لي حين انه لما تدوس علي التاب تضل تفتح سكور بورد علي

بس المشكله انه تضل هيك تفتح كانه معلق 

Link to comment
local sx, sy = guiGetScreenSize() 
sx, sy = ( sx / 1280 ), ( sy / 720 )
local alpha = 0
local fadeSpeed = 4
function isEventHandlerAdded( sEventName, pElementAttachedTo, func )
	if 
		type( sEventName ) == 'string' and 
		isElement( pElementAttachedTo ) and 
		type( func ) == 'function' 
	then
		local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo )
		if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then
			for i, v in ipairs( aAttachedFunctions ) do
				if v == func then
					return true
				end
			end
		end
	end

	return false
end

    function drawscoreboard()
          		alpha = alpha + fadeSpeed
        if alpha >= 255 then 
            alpha =255
    	end 
            dxDrawRectangle(241*sx, 212*sy, 799*sx, 70*sy, tocolor(0, 254, 144,alpha))
            dxDrawRectangle(241*sx, 282*sy, 799*sx, 232*sy, tocolor(0, 0, 0,alpha))

    end
bindKey('tab','both',function(_,st)
    if st=='down' then
    if not isEventHandlerAdded("onClientRender", getRootElement(),drawscoreboard) then
        fadeSpeed = 4
        alpha=0
 		 addEventHandler("onClientRender", getRootElement(),drawscoreboard)
	end
      else
          if  isEventHandlerAdded("onClientRender", getRootElement(),drawscoreboard) then
 		 removeEventHandler("onClientRender", getRootElement(),drawscoreboard)
	end
      end
  end)

ما ادري بيزبط او لا لكن جرب

Edited by Master_MTA
Link to comment

 

27 minutes ago, Master_MTA said:

local sx, sy = guiGetScreenSize() 
sx, sy = ( sx / 1280 ), ( sy / 720 )
local alpha = 0
local fadeSpeed = 4
function isEventHandlerAdded( sEventName, pElementAttachedTo, func )
	if 
		type( sEventName ) == 'string' and 
		isElement( pElementAttachedTo ) and 
		type( func ) == 'function' 
	then
		local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo )
		if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then
			for i, v in ipairs( aAttachedFunctions ) do
				if v == func then
					return true
				end
			end
		end
	end

	return false
end

    function drawscoreboard()
          		alpha = alpha + fadeSpeed
        if alpha >= 255 then 
            alpha =255
    	end 
            dxDrawRectangle(241*sx, 212*sy, 799*sx, 70*sy, tocolor(0, 254, 144,alpha))
            dxDrawRectangle(241*sx, 282*sy, 799*sx, 232*sy, tocolor(0, 0, 0,alpha))

    end
bindKey('tab','both',function(_,st)
    if st=='down' then
    if not isEventHandlerAdded("onClientRender", getRootElement(),drawscoreboard) then
        fadeSpeed = 4
        alpha=0
 		 addEventHandler("onClientRender", getRootElement(),drawscoreboard)
	end
      else
          if  isEventHandlerAdded("onClientRender", getRootElement(),drawscoreboard) then
 		 removeEventHandler("onClientRender", getRootElement(),drawscoreboard)
	end
      end
  end)

ما ادري بيزبط او لا لكن جرب

fade out ?زبط بس لما تشيل صبعك علي التاب مايجي 

Edited by liwahadri
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...