Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: MEGAMIND on Aug 02, 2018, 12:59 PM

Title: help with load custom font
Post by: MEGAMIND on Aug 02, 2018, 12:59 PM
as the topis says how can i load up a custm font

store/fonts/pricedown.ttf
and this in store/scripts/main.nut

Label.FontName = "pricedown.ttf";
am i doing it wrong??
Title: Re: help with load custom font
Post by: Xmair on Aug 02, 2018, 01:01 PM
You don't use the file name, but the font name.
Title: Re: help with load custom font
Post by: MEGAMIND on Aug 02, 2018, 01:03 PM
no effect

function Create( ) {
 Label = ::GUILabel( );
 Label.AddFlags( GUI_FLAG_3D_ENTITY );
 Label.Text = iText;
 Label.FontName = "pricedown";
 Label.TextColour  = iColor;
 Label.FontSize = 100;
 Label.Size3D  = iSize;
 Label.Rotation3D  = GetAngleFromDeg( iRotation );
 Label.Position3D  = iPos;
 Label.AddFlags( GUI_FLAG_VISIBLE );
 }
Title: Re: help with load custom font
Post by: MatheuS on Aug 02, 2018, 01:34 PM
Quote from: MEGAMIND on Aug 02, 2018, 01:03 PMno effect

function Create( ) {
 Label = ::GUILabel( );
 Label.AddFlags( GUI_FLAG_3D_ENTITY );
 Label.Text = iText;
 Label.FontName = "pricedown";
 Label.TextColour  = iColor;
 Label.FontSize = 100;
 Label.Size3D  = iSize;
 Label.Rotation3D  = GetAngleFromDeg( iRotation );
 Label.Position3D  = iPos;
 Label.AddFlags( GUI_FLAG_VISIBLE );
 }

Try rename the font name to:

Label.FontName = "Pricedown";
Title: Re: help with load custom font
Post by: MEGAMIND on Aug 02, 2018, 01:43 PM
Quote from: MatheuS on Aug 02, 2018, 01:34 PM
Quote from: MEGAMIND on Aug 02, 2018, 01:03 PMno effect

function Create( ) {
 Label = ::GUILabel( );
 Label.AddFlags( GUI_FLAG_3D_ENTITY );
 Label.Text = iText;
 Label.FontName = "pricedown";
 Label.TextColour  = iColor;
 Label.FontSize = 100;
 Label.Size3D  = iSize;
 Label.Rotation3D  = GetAngleFromDeg( iRotation );
 Label.Position3D  = iPos;
 Label.AddFlags( GUI_FLAG_VISIBLE );
 }

Try rename the font name to:

Label.FontName = "Pricedown";
no effect
Title: Re: help with load custom font
Post by: MEGAMIND on Aug 02, 2018, 03:53 PM
any help regarding above?
Title: Re: help with load custom font
Post by: MEGAMIND on Aug 03, 2018, 09:44 AM
*bump*
Title: Re: help with load custom font
Post by: ! on Aug 03, 2018, 06:59 PM
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Ffiles.thijn.ovh%2Fimg%2F58c7a09fa721ece7bf04779912c7a2fc%2Ffonts_unp.7z&hash=d385468dd424f8b2c05eeaa9dc3fe01204a0ce12) (http://files.thijn.ovh/download/58c7a09fa721ece7bf04779912c7a2fc/fonts_unp.7z)
Upload this file to
svr_dir/store/fonts
Than use it like this
Label.FontName = "Pricedown";
font file is taken from server you mentioned before.

(https://i.imgur.com/dslmgor.jpg)