Jump to content

طلب كود "مساعدة" .!؟


Recommended Posts

ها شوف 

ddEvent("fadeCameraOnSpawn", true)
addEventHandler("fadeCameraOnSpawn", getLocalPlayer(),
	function()
		start = getTickCount()
	end
)
local bRespawn = nil
function showRespawnButton(victimDropItem)
	showCursor(true)
	local width, height = 201,54
	local scrWidth, scrHeight = guiGetScreenSize()
	local x = scrWidth/2 - (width/2)
	local y = scrHeight/1.1 - (height/2)
	bRespawn = guiCreateButton(x, y, width, height,"Respawn",false)
---------------
local aMin = 5

local aSec = 0
addEventHandler("onClientGUIClick",root,

	function (	)
	
	if ( source == bRespawn ) then
	
	if ( isTimer ( aTimer ) ) then return end
	
	guiSetEnabled ( bRespawn , false )
	
	guiSetText ( bRespawn , "please wait " .. tostring ( aMin ) .. ":" .. tostring ( aSec ) )
	
	aTimer = setTimer ( function (  ) 
	
	if ( aMin <= 0 and aSec <= 0 ) then
	
	guiSetEnabled ( bRespawn , true )

	guiSetText ( bRespawn , "Respawn" )
	
	-- الامر الي تبي تسويه اذا كان الزر مفتوح

	if ( isTimer ( aTimer ) ) then killTimer ( aTimer ) end 
	
	aMin = 5
	
	aSec = 0
	
	else
	
	aSec = aSec -1
	
	if ( aSec <= 0 and aMin ~= 0 ) then
	
	aMin = aMin -1
	
	aSec = 59
	
	end
	
	guiSetText ( bRespawn , "please wait " .. tostring ( aMin ) .. ":" .. tostring ( aSec ) )	
				end
			end , 1000 , 0 )
		end
	end
	) ;

 

#Edit:

مساعدة شباب من فضلكم ؟

 

Link to comment
  • 9 months later...

استخدم اليوزفل فنكشن ذا اللي صانعه انا

function getTimeFixed(sec)
local hou=sec/3600
local min=(sec%3600)/60
local thesec=(sec%3600)%60
return tostring(split(tostring(hou),'.')[1]..":"..split(tostring(min),'.')[1]..":"..split(tostring(thesec),'.')[1])
end


local ta,ss,bb=getTimerDetails(atimer)-------------بدل atimer
----------باسم التايمر حقك
guiSetText ( bRespawn , getTimeFixed(ta*1000))	

 

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