iMr.3a[Z]eF Posted June 8, 2013 Share Posted June 8, 2013 السلآم عليكم ورحمة الله وبركاته,,, ما أبي الا كود صغيرون ذذ كود التوقيت اللي يجي ع الدي أكسس Link to comment
iMr.3a[Z]eF Posted June 8, 2013 Author Share Posted June 8, 2013 يعني يطلع دي أكس مثلا لو يلمس الماركر مؤقت من 1:33 وينقص لو وصل لصفر يسوي ديستروي ألمنت ذذ Link to comment
فاّرس Posted June 8, 2013 Share Posted June 8, 2013 local num = 133 addEventHandler("onClientRender", root, function() dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) Timer = setTimer( function () num = num - 1 if num <= -1 then killTimer(Timer) num = 0 end end,1000,0) Link to comment
iMr.3a[Z]eF Posted June 8, 2013 Author Share Posted June 8, 2013 انا أبي الدي أكس يجي بعد ما يركب السيارة أججل سويت كذا ما زبط function T() local num = 133 addEventHandler("onClientRender", root, function() dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) end addEventHandler("onVehicleEnter", root, T) Timer = setTimer( function () num = num - 1 if num <= -1 then killTimer(Timer) num = 0 end end,1000,0) Link to comment
فاّرس Posted June 8, 2013 Share Posted June 8, 2013 local num = "10" local Number = "1:" addEventHandler("onClientRender", root, function() dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( Number ), 370, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) Timer = setTimer( function () num = num - 1 if num <= -1 then killTimer(Timer) num = 0 end end,1000,0) + للمعلوميه ما تقدر تخفي الدي اكس,, Link to comment
MSHOOSH Posted June 8, 2013 Share Posted June 8, 2013 local num = "10" local Number = "1:" addEventHandler("onClientRender", root, function() dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( Number ), 370, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) Timer = setTimer( function () num = num - 1 if num <= -1 then killTimer(Timer) num = 0 end end,1000,0) + للمعلوميه ما تقدر تخفي الدي اكس,, كيف يعني ؟ بامكانك تحذف اي ايلميت ب destroyElement وضح ي بيست Link to comment
iMr.3a[Z]eF Posted June 8, 2013 Author Share Posted June 8, 2013 أدري بس أبي الألمنت يظهر بعد ما أخش السيارة Link to comment
فاّرس Posted June 8, 2013 Share Posted June 8, 2013 local num = "10" local Number = "1:" addEventHandler("onClientRender", root, function() dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( Number ), 370, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) Timer = setTimer( function () num = num - 1 if num <= -1 then killTimer(Timer) num = 0 end end,1000,0) + للمعلوميه ما تقدر تخفي الدي اكس,, كيف يعني ؟ بامكانك تحذف اي ايلميت ب destroyElement وضح ي بيست اي , بس مو كلها اكثرها, مثل الدي اكس ما تقدر تحذفه, Link to comment
iMr.3a[Z]eF Posted June 8, 2013 Author Share Posted June 8, 2013 This function destroys an element and all elements within it in the hierarchy Link to comment
AhmeD~9MoD Posted June 8, 2013 Share Posted June 8, 2013 طيب جرب احذف الدي اكس بـ destroyElement .. Link to comment
iMr.3a[Z]eF Posted June 8, 2013 Author Share Posted June 8, 2013 أدري بس أبي الألمنت يظهر بعد ما أخش السيارة Link to comment
AhmeD~9MoD Posted June 8, 2013 Share Posted June 8, 2013 أدري بس أبي الألمنت يظهر بعد ما أخش السيارة إلي هو الدي اكس ؟؟ getVehicleOccupant or isPedInVehicle guiSetVisible Link to comment
فاّرس Posted June 8, 2013 Share Posted June 8, 2013 سوي ريموف للرندر ويختفي كذآ , local num = "10" local Number = "1:" function Updated() Dx = dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( Number ), 370, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onClientRender", root,Updated) Timer = setTimer( function () num = num - 1 if num <= -1 then if isTimer(Timer) then killTimer(Timer) Timer = nil end removeEventHandler("onClientRender",root,Updated) num = 0 end end,1000,0) Link to comment
PaiN^ Posted June 8, 2013 Share Posted June 8, 2013 الدي اكس ماهو اليمينت, هو مجرد تغيير للون في البيكسلات على الشاشة أو شي زي كذا ذذ Link to comment
AhmeD~9MoD Posted June 8, 2013 Share Posted June 8, 2013 الدي اكس ماهو اليمينت, هو مجرد تغيير للون في البيكسلات على الشاشة أو شي زي كذا ذذ من كذا مايصير تحذفه بـ destroyElement ? Link to comment
PaiN^ Posted June 8, 2013 Share Posted June 8, 2013 لا لانه ما هو عنصر اصلا الحل الوحيد هو استخدام : removeEventHandler Link to comment
فاّرس Posted June 8, 2013 Share Posted June 8, 2013 (edited) انا أبي الدي أكس يجي بعد ما يركب السيارة أججلسويت كذا ما زبط function T() local num = 133 addEventHandler("onClientRender", root, function() dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) end addEventHandler("onVehicleEnter", root, T) Timer = setTimer( function () num = num - 1 if num <= -1 then killTimer(Timer) num = 0 end end,1000,0) سم, local num = "10" local Number = "1:" function Updated() Dx = dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( Number ), 370, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onClientVehicleStartEnter",root,function() addEventHandler("onClientRender", root,Updated) end) Timer = setTimer( function () num = num - 1 if num <= -1 then if isTimer(Timer) then killTimer(Timer) Timer = nil end removeEventHandler("onClientRender",root,Updated) num = 0 end end,1000,0) Edited June 8, 2013 by Guest Link to comment
AhmeD~9MoD Posted June 8, 2013 Share Posted June 8, 2013 لا لانه ما هو عنصر اصلا الحل الوحيد هو استخدام : removeEventHandler اها , Link to comment
iMr.Dawix~# Posted June 8, 2013 Share Posted June 8, 2013 جرب ذا مع اني ماتوقع بيضبط function T() local num = 133 addEventHandler("onClientRender", root, function() dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) end addEventHandler("onClientVehicleEnter", root,function () addEventHandler("onClientRender",root,T) Timer = setTimer(TN,1000,0) end) addEventHandler("onClientVehicleEnter", root,function () removeEventHandler("onClientRender",root,T) Timer = nil end) function TN() num = num - 1 if num <= -1 and isElement(Timer) then killTimer(Timer) num = 0 end end Link to comment
فاّرس Posted June 8, 2013 Share Posted June 8, 2013 جرب ذا مع اني ماتوقع بيضبط function T() local num = 133 addEventHandler("onClientRender", root, function() dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) end addEventHandler("onClientVehicleEnter", root,function () addEventHandler("onClientRender",root,T) Timer = setTimer(TN,1000,0) end) addEventHandler("onClientVehicleEnter", root,function () removeEventHandler("onClientRender",root,T) Timer = nil end) function TN() num = num - 1 if num <= -1 and isElement(Timer) then killTimer(Timer) num = 0 end end انا أبي الدي أكس يجي بعد ما يركب السيارة أججلسويت كذا ما زبط function T() local num = 133 addEventHandler("onClientRender", root, function() dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) end addEventHandler("onVehicleEnter", root, T) Timer = setTimer( function () num = num - 1 if num <= -1 then killTimer(Timer) num = 0 end end,1000,0) سم, local num = "10" local Number = "1:" function Updated() Dx = dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( Number ), 370, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onClientVehicleStartEnter",root,function() addEventHandler("onClientRender", root,Updated) end) Timer = setTimer( function () num = num - 1 if num <= -1 then if isTimer(Timer) then killTimer(Timer) Timer = nil end removeEventHandler("onClientRender",root,Updated) num = 0 end end,1000,0) Link to comment
iMr.Dawix~# Posted June 8, 2013 Share Posted June 8, 2013 انا سويت له يشيل الدي اكس لو نزل ومدري وش يعني لو يجرب 2 احسن من 1^ Link to comment
فاّرس Posted June 8, 2013 Share Posted June 8, 2013 اذا يبيه يوم ينزل , local num = "33" local Number = "1:" function Updated() Dx = dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( Number ), 370, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onClientVehicleStartEnter",root,function() addEventHandler("onClientRender", root,Updated) end) addEventHandler("onClientVehicleStartExit",root,function() removeEventHandler("onClientRender",root,Updated) end) Timer = setTimer( function () num = num - 1 if num <= -1 then if isTimer(Timer) then killTimer(Timer) Timer = nil end removeEventHandler("onClientRender",root,Updated) num = 0 end end,1000,0) Link to comment
|Mr|-Talal07-| Posted June 8, 2013 Share Posted June 8, 2013 local num = 93000 local stat = false function Updated() local m,s,ss = toTime(num) dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(m .. ":" .. s .. ":" .. ss, 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onClientVehicleStartEnter",root,function() addEventHandler("onClientRender", root,Updated) stat = true end) addEventHandler("onClientVehicleStartExit",root,function() removeEventHandler("onClientRender",root,Updated) stat = false end) Timer = setTimer( function () if stat == false then return end num = num - 1 if num <= -1 then if isTimer(Timer) then killTimer(Timer) Timer = nil removeEventHandler("onClientRender",root,Updated) num = 0 end end end,1000,0) function toTime(ms) -- missiontimer << if not ms then return '' end if ms < 0 then return "0","00","00" end local centiseconds = tostring(math.floor(math.fmod(ms, 1000)/10)) if #centiseconds == 1 then centiseconds = '0' .. centiseconds end local s = math.floor(ms / 1000) local seconds = tostring(math.fmod(s, 60)) if #seconds == 1 then seconds = '0' .. seconds end local minutes = tostring(math.floor(s / 60)) return minutes, seconds, centiseconds end Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now