Shadow Font

ZkaRu

Pirate
Registered
LV
0
 
Joined
Jan 27, 2026
Messages
9
Solutions
1
Reaction score
2
Points
5
1771514046495.webp

I saw alot of ppl asking for this font, this isnt a specific font, u can modify it at UIHeadSay.cpp -> void CHeadSay::Render( D3DXVECTOR3& pos ) -> look for this "CGuiFont::s_Font.BRender(s_sNamePart, x + iStartPosX, y - iNameHeightStep, s_dwNamePartsColors[0], s_dwNamePartsColors[1]);" and replace with:
int px = x + iStartPosX;
int py = y - iNameHeightStep;

DWORD textColor = s_dwNamePartsColors[0];
DWORD outline = 0xFF000000; // black (u can change it)

for (int ox = -2; ox <= 2; ox++)
{
for (int oy = -2; oy <= 2; oy++)
{
if (ox == 0 && oy == 0) continue;
CGuiFont::s_Font.Render(s_sNamePart, px + ox, py + oy, outline);
}
}

CGuiFont::s_Font.Render(s_sNamePart, px, py, textColor);
and thats it, u can change font too, at scripts->lua->font.clu
 
  • Like
Reactions: Grim4ik
Great, thanks for sharing. I did it a little differently.

MPFont.h
C++:
bool DrawTextOutline(char* szText, int x, int y, D3DXCOLOR textColor, D3DXCOLOR outlineColor, int outlineWidth);
MPFont.cpp
C++:
bool CMPFont::DrawTextOutline(char* szText, int x, int y, D3DXCOLOR textColor, D3DXCOLOR outlineColor, int outlineWidth)
{
    if (!szText) return false;
    Begin();

    const int directions = 12;
    for (int i = 0; i < directions; ++i)
    {
        float angle = 2.0f * 3.1415926f * i / directions;
        int dx = static_cast<int>(round(cos(angle) * outlineWidth));
        int dy = static_cast<int>(round(sin(angle) * outlineWidth));
        if (dx != 0 || dy != 0)
            Draw(szText, x + dx, y + dy, outlineColor);
    }
    Draw(szText, x, y, textColor);
    End();
    return true;
}
UIFont.h
C++:
void    ORender(const char* str, int x, int y, DWORD textColor, DWORD outlineColor, int outlineWidth);
UIFont.cpp
C++:
inline void CGuiFont::ORender(const char* str, int x, int y, DWORD textColor, DWORD outlineColor, int outlineWidth)
{
    GetRender().DrawConvert(x, y);
    _pFont->DrawTextOutline((char*)str, x, y, textColor, outlineColor, outlineWidth);
}

Now where to use it
C++:
CGuiFont::s_Font.ORender(text,
                         x,
                         y,
                         TextColors,     //0xFFFFFFFF
                         OutlineColors,    //0xFF000000
                         1);             //Outline thickness in pixels