Jump to content

اضافه خط للعبه


Recommended Posts

خش الميتا

وضيف فيها الخط كأنه اي صورة عادية تضيفها للمود

ثم روح لجهة كلنت وضيف

font = dxCreateFont("RobotoSlab-Bold.tff") 

fontويوم تبي تكتب شي مثلا بدل اسم الخط حط بدله المتغير

Link to comment
local myFont = nil 
  
-- Display text using dxDrawText 
addEventHandler( "onClientRender", root, 
    function() 
        if myFont then 
            dxDrawText( "dxDrawText", 100, 350, 300, 350, tocolor(255,255,0), 1, myFont ) 
        end 
    end 
) 
  
-- Use 'toggle' command to switch custom font on and off 
addCommandHandler( "toggle", 
    function() 
        if not myFont then 
            myFont = dxCreateFont( "segoeui.ttf", 20 )  -- Create custom font 
        else         
            destroyElement( myFont )                    -- Destroy custom font 
            myFont = nil 
        end 
    end 
) 

شوف مثال الويكي

#|_oskar_|#

يقول دي اكس مو GUI

Link to comment

السلام عليكم ورحمه الله وبركاته

كيف بدي اضيف خط جديد لدي اكس تيكست

RobotoSlab-Bold.tff

ممكن حل او مساعده

____________________________________________

الخط ما تغير
ff.ttf 
  
  
ff = dxCreateFont("ff.tff") 
  
"ff.ttf" /> 

السطر

ff = dxCreateFont("ff.tff") 

ينحط بجهة كلنت مب بالميتا

Link to comment
صاحب الموضوع معلش اسف على التدخل في موضوعك بس بما انك فاتحه بس سؤال بسيط

لو بضيف جديد واحط الخط في ملفات المود وش احتاج مشان اخليه يشتغل مع لوحات gui

شوف رد اوسكار

+ تعرف الخط بالميتا

ولازم يكون الخط نفس الاسم الي حطيته بالميتا

Link to comment

ما ضبط اخوي شوف

كلنت

--[[-------------------------------------------------- 
    GUI Editor 
    client & server 
    menu.lua 
     
    cross-usable utility functions 
--]]-------------------------------------------------- 
  
  
_DEBUG = false 
_DEBUG_CATEGORIES = { 
    MOVER = false, 
    CREATOR = false, 
    GUI_CODE_GENERATION = false, 
    RESOLUTION_PREVIEW = false, 
    MULTILINE_EDITBOX = false, 
    UNDO_REDO = false, 
    INVALID_DATA = false, 
    GENERAL = false, 
    LOAD_CODE = true, 
    LOAD_CODE_INTERNAL = false, 
    POSITION_CODER = false, 
    MENU_ITEM = false, 
    TEXT_EFFECT_LOAD = true, 
    UNDO_REDO_CONDITION = false 
} 
  
  
--[[-------------------------------------------------- 
    debug things 
--]]-------------------------------------------------- 
function outputDebug(message, category, level) 
    if _DEBUG then 
        message = tostring(message) 
         
        if category then 
            if not _DEBUG_CATEGORIES[category] then 
                return 
            end 
             
            message = message .. " ["..category.."]" 
        end 
  
        local source = "" 
        local line = "" 
  
        for title, info in pairs(debug.getinfo(2, "lS")) do 
            if tostring(title) == "source" then 
                local s, e = tostring(info):find('\\mods\\deathmatch\\resources\\', 0, true) 
                 
                if s and e then 
                    source = tostring(info):sub(e) 
                end 
            elseif tostring(title) == "currentline" then 
                line = tostring(info) 
            end 
        end  
  
        outputDebugString(source..":"..line..": " .. message, level or 3) 
    end 
end 
  
font = guiCreateFont("ZapfinoExtraLTPro.tff") 

ميتا

    "Remp" name="GUI Editor" version="3.1.3" type="misc"/> 
  
    "help.xml" type="client"/> 
     
    

وضفت الخط في ملف الفونتس وما يشتغل

Link to comment
GUIEditor.window[1] = guiCreateWindow(469, 251, 244, 413, "a", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible (GUIEditor.window[1],false) 
         
        x3 = guiCreateLabel(43, 46, 91, 18, "dOXET", false) 
        guiSetFont(x3, "sss"); 
         
  
        GUIEditor.staticimage[1] = guiCreateStaticImage(9, 46, 34, 34, "music/1.png", false, GUIEditor.window[1]) 
        GUIEditor.staticimage[2] = guiCreateStaticImage(9, 90, 34, 34, "music/aa.png", false, GUIEditor.window[1]) 
        GUIEditor.staticimage[3] = guiCreateStaticImage(9, 178, 34, 34, "music/bb.png", false, GUIEditor.window[1]) 
        GUIEditor.staticimage[4] = guiCreateStaticImage(9, 222, 34, 34, "music/cc.png", false, GUIEditor.window[1]) 
        GUIEditor.staticimage[5] = guiCreateStaticImage(10, 134, 34, 34, "music/4.png", false, GUIEditor.window[1]) 
        GUIEditor.label[1] = guiCreateLabel(43, 46, 91, 18, "dOXET", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sss") 

سويتة لكن ما يتغير الخط ابدا ابدا وجربت احط انجليزي او عربي ما يتغير ليه؟؟

Link to comment
ما اختلف شي اصلن عن كودي الاساسي الله يهديك :]

نفس المشكله

ضفت الخط بالأسل +الملف

من جدك تتكلم ؟

رح شف انت ماسويت الخط اصلا كيف تبي تسوي له خط

وشف وش سويت انا <>

ركز زين الله يهديك

Link to comment

Size = 20 -- حجم الخط 
  
Font = guiCreateFont( "sss.ttf", Size  ) ; 
  
        GUIEditor.window[1] = guiCreateWindow(469, 251, 244, 413, "a", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible (GUIEditor.window[1],false) 
        
        x3 = guiCreateLabel(43, 46, 91, 18, "dOXET", false) 
        guiSetFont(x3, Font ); 
        
  
        GUIEditor.staticimage[1] = guiCreateStaticImage(9, 46, 34, 34, "music/1.png", false, GUIEditor.window[1]) 
        GUIEditor.staticimage[2] = guiCreateStaticImage(9, 90, 34, 34, "music/aa.png", false, GUIEditor.window[1]) 
        GUIEditor.staticimage[3] = guiCreateStaticImage(9, 178, 34, 34, "music/bb.png", false, GUIEditor.window[1]) 
        GUIEditor.staticimage[4] = guiCreateStaticImage(9, 222, 34, 34, "music/cc.png", false, GUIEditor.window[1]) 
        GUIEditor.staticimage[5] = guiCreateStaticImage(10, 134, 34, 34, "music/4.png", false, GUIEditor.window[1]) 
        GUIEditor.label[1] = guiCreateLabel(43, 46, 91, 18, "dOXET", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], Font );       

كودك كذا يصير لاتعدل فيه شي , حبيت تجرب الي قلته انا واصحح لك

بس مانتبهت زين على الي قلته

في كودك وين فنكشن انشاء الخط

guiCreateLabel 

جرب ذا ورد خبر , ماضبط اطرح الميتا

Link to comment
تم اشتغل بس ليه ما ينفع داخل مجلد اخي؟

عشان لو تبي تحطه داخل مجلد لازم تعدل مسار الملف مرة ثانية بالكود بعدها

يعني شوف هنا

Font = guiCreateFont( "sss.ttf", Size  ) ; 

لازم تضيف المسار الصحيح له فـ يصير كذا

Font = guiCreateFont( "music/sss.ttf", Size  ) ; 

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