Dateien

> > CS2D > Lua Scripts > hudtxt: textwidth() & charwidth()
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch hudtxt: textwidth() & charwidth() >

7 Kommentare25 kb, 574 Downloads

alt hudtxt: textwidth() & charwidth()

SQ
Moderator Off Offline

// Version 1.0 2017/12/03

// Description
Using this library you are able to get string width. Handy for the scripts that are using hudtxt command!

// Notes
• Recommended for "mp_hudscale 0" and "mp_hudscale 3"
• It works with 1, 2 modes as well.
× This works only with default font

// Functions
> imageFont.Load( path ) -- used only once
> textwidth ( string, size = 13 )
> charwidth ( char, size = 13 )

// Sample
1
2
3
4
5
dofile("sys/lua/imageFont.lua")

imageFont.Load('sys/lua/font.dat')

print(textwidth("hello world"))
12× editiert, zuletzt 05.12.17 19:41:58
Zugelassen von Infinite Rain

Download Download

25 kb, 574 Downloads

Kommentare

7 Kommentare
Zum Anfang Vorherige 1 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt

SQ
Moderator Off Offline

@user novA2DOT: What you don't like about it?

alt

novA2DOT
User Off Offline

bad script

alt

Infinite Rain
Reviewer Off Offline

Thank you a lot for this.
Ich mag es!

alt

Masea
Super User Off Offline

Thank you
Ich mag es!
Zum Anfang Vorherige 1 Nächste Zum Anfang