![]() ![]() If your font doesn't show up or shows up as the default font, then make sure that you entered the correct name and that the font you're using actually exists. There doesn't seem to be code in place to warn a user if they used an invalid font in a function, particularly in panels.To use a font, self made or otherwise, simply use the name of it in place of the 'font' argument, such as:ĭraw.SimpleText ( "Hello!", "MyFont", 100, 100, color_white ) Notes If you make a change to a surface.CreateFont function in a script while the game is running, you will need to run gm_clearfonts in order for the changes to your font(s) to show. This is a developer console command and should never be called from a mod/gamemode. However, you can call the console command gm_clearfonts to clear all of the known custom fonts. Custom fonts persist even if the game server (local or network) is reloaded, so if the font "MyFont" already exists then nothing will be created. I suggest binding XGUI to any key for quick access. You can access XGUI with either menu chat command or xgui console command. ![]() If you already have addon such as ULX go to your server’s console. Surface.CreateFont ( "akbar", 48, 500, true, true, "MyFont" ) If you don’t see Management tab you either don’t have administration addon or you are not admin. ![]() Creating FontsĬustom fonts should be defined in the hook GM:Initialize, using the surface.CreateFont function. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |