Jump to content

King12

Members
  • Posts

    439
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by King12

  1. طيب الارقام ضبطت بس الصوره مختفيه
  2. يوم حطيت كودك الريس كله خرب هذا الكود حقي مع كودك addEventHandler('onClientResourceStart', g_ResRoot, function() g_Players = getElementsByType('player') fadeCamera(false,0.0) -- create GUI local screenWidth, _ = guiGetScreenSize ( ) if screenWidth > 1100 then timeleft_ = screenWidth-200 timepassed_ = screenWidth-100 elseif screenWidth > 900 then timeleft_ = screenWidth-160 timepassed_ = screenWidth-70 else timeleft_ = screenWidth-125 timepassed_ = screenWidth-65 end local timeleft_ = 1705 -- to change the resoultion local timepassed_ = 1835 local imgSize = 1250 -- centerGUI = function ( gui ) -- local screenW,screenH=guiGetScreenSize() -- local windowW,windowH=guiGetSize(gui,false) -- local x,y = ( screenW-windowW )/2, ( windowH )/20 -- guiSetPosition ( gui, x, y, false ) -- end g_dxGUI = { checkpoint = dxText:create('0/0', screenWidth - 15, screenHeight - 54, false, 'bankgothic', 0.8, 'right'), fpsdisplay = dxText:create('#ff8000FPS: #cccccc', 5, screenHeight - dxGetFontHeight(0.8, 'bankgothic')*1.5, false, 'bankgothic', 0.5, 'left'), mapdisplay = dxText:create('#ff8000Map: #cccccc', 5, screenHeight - dxGetFontHeight(0.78, 'bankgothic'), false, 'bankgothic', 0.5, 'left'), nmdisplay = dxText:create('#ff8000Next: #ccccccRandom', 5, screenHeight - dxGetFontHeight(0.6, 'bankgothic')/2, false, 'bankgothic', 0.5, 'left') } g_GUI = { timeleftbg = guiCreateStaticImage ( 0, 0, screenWidth, 70, 'img/timeleft.png', false ), timeleft = guiCreateLabel ( timeleft_, 25, 100, 30, '', false, timeleftbg ), timepassed = guiCreateLabel ( timepassed_, 25, 100, 30, '', false, timeleftbg ), } ..etc
  3. http://store2.up-00.com/Apr13/Azd71393.png edit #1 local timeleft_ = 1705 -- to change the resoultion local timepassed_ = 1835 local imgSize = 1250 timeleftbg = guiCreateStaticImage ( 669, 0, imgSize, 60, "img/timeleft.png", false ), هذي الاحداثيات حقاتي ^
  4. in 1920 x 1080 in 1280 x 720 + حذفت آخر سطر من الكود حقي , لاني عجزت آحرك الصوره يوم حطيت هالشي
  5. شكراً ع المساعده بس كيف آوزن الصوره مع الاعدادات حقت الشاشه بعد ؟ لآنه زي ماتشوف الصوره صاير عريضه مره , وآنا آبي آصغرها للمقاسات الكبيره edit #1 : بعد ماضبطت المقاسات حقت الرقمين ع اعدادات الشاشه 1920 x 1080 ويوم شغلت اللعبه على 1280 x 720 صار كذا
  6. شكرا عناد + الشبح بس آخوي عناد الرقمين اللي حاطهم بالكود آول شي كيف بخليهم يجون ع كل الشاشات نفس المقاس
  7. كيف هذا يعتمد ع الشاشه ولا كيف ؟ يعني العرض + الطول اللي بكودك هم مقاسات الشاشه ؟ # يب اخوي مقاسات الشاشة .. وهذا الكود يجي عند كل الناس نفس الشي لو في اختلاف في الشاشات انت غير في الطول و العرض او يسار او يمنين او فوق او تحت الي يناسبك طيب يالحبيب , آنت حاط getCreateWindow + guiGetScreenSize آنا آبيه لليبل !
  8. كيف هذا يعتمد ع الشاشه ولا كيف ؟ يعني العرض + الطول اللي بكودك هم مقاسات الشاشه ؟
  9. آبغى الرقمين ينتصفون بنص الفراغين بالضبط + الصوره يصغر العرض حقها علشان تكون بشكل حلو
  10. السلام عليكم عندي مشكله بالريس , اللي هي بآعدادات الشاشه اعدادات شاشتي : 1920 x 1080 يطلع الوقت حق الماب والتايم ليفت كذا , آنا آبي اضبط الصوره ع اعدادات شاشتي , آو بمعنى آخر ع كل الشاشات علماً لما آحط اعدادات شاشتي على : 800x600 تضبط الصوره والرقمين آبغى الرقمين يكونون بنص الفراغين اللي بالصوره + الصوره العرض حقها يصغر علشان ماتصير غبيه زي اللي بالصوره g_GUI = { timeleftbg = guiCreateStaticImage(0, 0, screenWidth, 60, 'img/timeleft.png', false, nil), timeleft = guiCreateLabel(screenWidth - screenWidth/5.2 , 20, 100, 30, '', false), timepassed = guiCreateLabel(screenWidth - screenWidth/13, 20, 100, 30, '', false), } هذا هو الكود حقها
  11. يعطيكم العافيه ماقصرتوا : )
  12. مشكور وماتقصر Edit: آيضا الشكر لآخ عناد = )
  13. كيف يعني مافهمت ؟ آحط هذا مع الاول ؟
  14. وش السالفه وراك مسحت البيند ؟
  15. bg = guiCreateStaticImage(760, 1025, 400, 50, "images/blank.png", false) DisableCH = guiCreateStaticImage(760, 1025, 400, 50, "images/CHD.png", false) EnableCH = guiCreateStaticImage(760, 1025, 400, 50, "images/CHE.png", false) guiSetVisible ( DisableCH, false ) guiSetVisible ( EnableCH, false ) show = "DisableCH" changeImage = function ( value ) if isTimer(showTimer) then if tostring ( value ) == "DisableCH" then gui = DisableCH show = "EnableCH" elseif tostring ( value ) == "EnableCH" then gui = EnableCH show = "DisableCH" end if isElement ( gui ) then if not guiGetVisible ( gui ) then guiSetVisible ( gui, true ) showTimer = setTimer ( guiSetVisible, 1000, 1, gui, false ) end end end end bindKey ( "f1", "down", function ( ) changeImage ( show ) end ) كذا يعني ؟
  16. قصدي يعني لما يضغط اف1 تطلع الصوره الاولى واذا ضغط اف1 مره ثانيه قبل ماينتهي التايمر يلغي الصوره الاولى ويطلع الثانيه فهمتني ؟
  17. مشكور آخ عناد ^^! الكود شغال 100% تمت الإفاده .. معليش بس آبي آول مايضغط الحرف تطلع الصوره الثانيه آنا آشوف لما تطلع صوره ما اقدر اضغط الحرف مره ثانيه الا لما الاولى تختفي تقدر تخليها متى ماضغط الحرف تطلع الصوره الاولى او الثانيه يعني تشيل التايمر من الحرف
  18. function() test bg = guiCreateStaticImage(760, 1025, 400, 50, "images/blank.png", false) -- اللي فوق هذا ^ -- كود مو مهم حاولت اطبق طريقة سكربت عندي بهالحركه وعيت يعني مايضر لو مسحتوه ^ DisableCH = guiCreateStaticImage(760, 1025, 400, 50, "images/CHD.png", false) EnableCH = guiCreateStaticImage(760, 1025, 400, 50, "images/CHE.png", false) guiSetVisible( DisableCH ,false) guiSetVisible( EnableCH ,false) end setTimer( function showHide() if ( guiGetVisible ( bg ) == true ) then showCursor(false) guiSetVisible( bg ,false) guiSetVisible( DisableCH ,false) guiSetVisible( EnableCH ,false) else outputChatBox("CarHide Enabled", 255,136,0, true) end end bindKey( "F1", "down", showHide) ,1000,0) السلام عليكم آخواني حاولت آسوي سكربت آنه لما تضغط اف1 تطلع لك صوره تحت بنص الشاشه وتختفي بعد ثانيه , ولما تضغط اف1 مره ثانيه تطلع لك صوره ثانيه حاولت ماعرفت >< ممكن مساعدات ؟
  19. مافهمت الكود ذا ممكن تشرح لي لا هنت ؟ addEventHandler("onResourceStart",resourceRoot, function () for i,p in ipairs(getElementsByType("player")) do if not isGuestAccount(getPlayerAccount(p)) then if getAccountData(getPlayerAccount(p),"CustomTag") then setElementData(p,"CustomTag",getAccountData(getPlayerAccount(p),"CustomTag")) end end end end ) addEventHandler("onPlayerLogin",root, function (_,acc) if getAccountData(acc,"CustomTag") then setElementData(acc,"CustomTag",getAccountData(acc,"CustomTag")) end end ) + كيف يحفظ في الحساب؟ مافيه setAccountData
  20. حاولت فيه بس ماضبط معي : / addCommandHandler ( "supernick", function ( player, _, nick ) local accountname = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accountname, aclGetGroup ( "Admin" ) ) then if ( nick ) and ( string.len ( nick ) <= 80 ) then setElementData ( player, 'CustomTag', tostring ( nick ) ) setAccountData ( getPlayerAccount(player), 'CustomTag', tostring ( nick ) ) outputChatBox("[superNick]#FFFFFF Your SuperNick is: "..tostring ( nick ).." #FFFFFF.",player,255,136,0,true) end else outputChatBox("[ERROR] #ffffffOops! You are not allowed to do this.", player, 255,0,0,true) end end ) addEventHandler("onPlayerLogin",root, function (player) local accountname = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then local nickData = getAccountData ( getPlayerAccount(player), 'CustomTag' ) setElementData ( player, 'CustomTag', nickData ) end end ) وش الخطأ ؟ ما افهم كثير للاكاونت داتا : |
  21. طيب يالحبيب كيف اخلي النك ينحفظ بالحساب يعني لما يطلع من السيرفر ويدخل ويسجل دخوله يرجع النك اللي حطه
  22. لا هنتم ^^ ضبط معي الكود ذا addEventHandler ( 'onPlayerChat',root, function ( msg ) local r, g, b = getPlayerNametagColor ( source ) local value = getElementData ( source, 'CustomTag' ) if ( value ) then outputChatBox( value .. ' : ' .. msg, root, r, g, b, true ) else outputChatBox( getPlayerName ( source ) .. ' : ' .. msg, root, r, g, b, true ) end end ) addCommandHandler ( 'supernick', function ( player, _, nick ) if ( nick ) and ( string.len ( nick ) <= 64 ) then setElementData ( player, 'CustomTag', tostring ( nick ) ) end end ) طيب كيف اخلي الاسم يتعدل في السكور بورد اذا سوا الامر ؟
×
×
  • Create New...