Jump to content

مشكلة بتآيمر .


Recommended Posts

سلام عليكم

آلحين آنآ جآيب تآيمر من آلسيرفر وحآطه بآلكلينت بدي آكس

وآبي آسوي كل ثآنية

لو آلتآيمر آقل من آو يسآوي 3 , يغير كلمة محددة بآلدي آكس

لكن آلمشكلة تظبط لمآ يكون آلتآيمر آقل من آو يسآوي 30

مدري شسآلفة مزود 10

setTimer(function() 
	if theTimer <= "3" then
    text = "آقل من 3 " 
	end
end,1000,0) 

-----

setTimer( function()
	local timerMission = convertMilliseconds( getTimerDetails(timer) )
	if isTimer(timer) then
		triggerClientEvent( root, "timeStart2", root, timerMission )
	end
end, 50, 0 )

------

addEvent("timeStart2", true)
addEventHandler("timeStart2", root,
	function( timerMission )
		theTimer = "".. timerMission ..""
	end
)

 

Link to comment
17 minutes ago, Trefeor said:

اطرح الكلنت

 

19 minutes ago, Mr.Mostafa said:
  • addEvent("timeStart2", true)
  • addEventHandler("timeStart2", root,
  • function( timerMission )
  • theTimer = "".. timerMission ..""
  • end
  • )

 

addEventHandler("onClientRender", root,
    function()
        dxDrawText(""..theTimer.."", 68 - 1, 414 - 1, 98 - 1, 430 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68 + 1, 414 - 1, 98 + 1, 430 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68 - 1, 414 + 1, 98 - 1, 430 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68 + 1, 414 + 1, 98 + 1, 430 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68, 414, 98, 430, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
    end
)

 

Link to comment
13 minutes ago, Trefeor said:

هو راح يرجع لك سلسلة نصية 'string'

فـ تحتاج إن تستخدم tonumber وتتحقق بـ الي انت تبيه .

 

يعني كدآ ؟

setTimer( function()
	local timerMission = convertMilliseconds( getTimerDetails(timer) )
	if isTimer(timer) then
		triggerClientEvent( root, "timeStart2", root, tonumber(timerMission) )
	end
end, 50, 0 )

 

Link to comment

كذا اقصد

addEventHandler("onClientRender", root,
    function()
	theTimer = tonumber ( theTimer ) <= 50 and theTimer.." for end" or theTimer
        dxDrawText(""..theTimer.."", 68 - 1, 414 - 1, 98 - 1, 430 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68 + 1, 414 - 1, 98 + 1, 430 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68 - 1, 414 + 1, 98 - 1, 430 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68 + 1, 414 + 1, 98 + 1, 430 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68, 414, 98, 430, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
    end
)

هنا لو اقل من او يساوي 50 راح يجيب لك المتبقي وجنبها فور اند واذا عكس التحقق راح يجيب لك المتبقي فقط 

Link to comment
2 minutes ago, Trefeor said:

كذا اقصد


addEventHandler("onClientRender", root,
    function()
	theTimer = tonumber ( theTimer ) <= 50 and theTimer.." for end" or theTimer
        dxDrawText(""..theTimer.."", 68 - 1, 414 - 1, 98 - 1, 430 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68 + 1, 414 - 1, 98 + 1, 430 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68 - 1, 414 + 1, 98 - 1, 430 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68 + 1, 414 + 1, 98 + 1, 430 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
        dxDrawText(""..theTimer.."", 68, 414, 98, 430, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false)
    end
)

هنا لو اقل من او يساوي 50 راح يجيب لك المتبقي وجنبها فور اند واذا عكس التحقق راح يجيب لك المتبقي فقط 

آهآ تمآم , دقيقة بجرب

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