Jump to content

مشكلة في الوقت


Recommended Posts

 
addEvent("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)
	
   guiSetEnabled(bRespawn, false)
   guiSetText(bRespawn,"5")
    timer1=setTimer(guiSetEnabled,300000,1,bRespawn, true)
	   timer2= setTimer(guiSetText,300000,1,bRespawn,"Respawn")
		guiSetFont(bRespawn,"sa-header") 
	addEventHandler("onClientGUIClick", bRespawn, function () 
		if bRespawn then
			destroyElement(bRespawn)
			bRespawn = nil
			showCursor(false)
			guiSetInputEnabled(false)
		end
		triggerServerEvent("es-system:acceptDeath", getLocalPlayer(), getLocalPlayer(), victimDropItem)
		showCursor(false)
	end, false)
end
addEventHandler('onClientRender',root,function()
  if isTimer(timer2) then
    local stil,nb,nbb=getTimerDetails ( timer2 )
      local mint=stil/1000/60
      local sec=stil/1000/5
      guiSetText(bRespawn,math.ceil(math.floor(mint))..':'..math.ceil(sec))
    end
  end)

 و الاقت هون مش بالثانية في الدقيقة مبعرف ليش شوفو 

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...