FlorinSzasz Posted March 8, 2023 Share Posted March 8, 2023 (edited) So i want to add for my own drift resource a custom font i have done this thing in other resources long time ago but now it doesnt work and i dont know why? Also the font is installed on windows. <meta> <script src="drift_C.lua" type="client"/> <script src="drift_s.lua" type="server"/> <map src="drift.map" dimension="2"></map> <file src="oceanicdrift.ttf"></file> </meta> Client Side local font = guiCreateFont("oceanicdrift.ttf",20) driftlabel = guiCreateLabel(511, 859, 320, 81,"[ DRIFT: "..drift.." X "..counter.." ]", false) guiSetFont(driftlabel,font) guiLabelSetHorizontalAlign(driftlabel, "center", false) guiLabelSetVerticalAlign(driftlabel, "center") Errors [2023-03-08 22:01:25] WARNING: drift\drift_C.lua:25: Error creating font @ 'guiCreateFont' [oceanicdrift.ttf] [2023-03-08 22:01:25] WARNING: drift\drift_C.lua:28: Bad argument @ 'guiSetFont' [Expected gui-font at argument 2, got boolean] Edited March 8, 2023 by FlorinSzasz Link to comment
Shady1 Posted March 8, 2023 Share Posted March 8, 2023 make sure the font file and its extension are otf or ttf and make sure the file is not in a folder 17 minutes ago, FlorinSzasz said: So i want to add for my own drift resource a custom font i have done this thing in other resources long time ago but now it doesnt work and i dont know why? Also the font is installed on windows. <meta> <script src="drift_C.lua" type="client"/> <script src="drift_s.lua" type="server"/> <map src="drift.map" dimension="2"></map> <file src="oceanicdrift.ttf"></file> </meta> Client Side local font = guiCreateFont("oceanicdrift.ttf",20) driftlabel = guiCreateLabel(511, 859, 320, 81,"[ DRIFT: "..drift.." X "..counter.." ]", false) guiSetFont(driftlabel,font) guiLabelSetHorizontalAlign(driftlabel, "center", false) guiLabelSetVerticalAlign(driftlabel, "center") Errors [2023-03-08 22:01:25] WARNING: drift\drift_C.lua:25: Error creating font @ 'guiCreateFont' [oceanicdrift.ttf] [2023-03-08 22:01:25] WARNING: drift\drift_C.lua:28: Bad argument @ 'guiSetFont' [Expected gui-font at argument 2, got boolean] 1 Link to comment
FlorinSzasz Posted March 8, 2023 Author Share Posted March 8, 2023 6 minutes ago, Shady1 said: make sure the font file and its extension are otf or ttf and make sure the file is not in a folder Well the font is the right extension and is in the same folder as the scripts. Here is a picture! https://drive.google.com/file/d/1GdXLMYHo7q4_TVtT0LbQfn_6EjvjriTf/view?usp=sharing Link to comment
Shady1 Posted March 8, 2023 Share Posted March 8, 2023 11 minutes ago, FlorinSzasz said: Well the font is the right extension and is in the same folder as the scripts. Here is a picture! https://drive.google.com/file/d/1GdXLMYHo7q4_TVtT0LbQfn_6EjvjriTf/view?usp=sharing so can you show client-side ? Link to comment
FlorinSzasz Posted March 8, 2023 Author Share Posted March 8, 2023 44 minutes ago, Shady1 said: so can you show client-side ? Fixed I had to increase my 2200g allocated video memory from 64 to 512mb i had no FreeVideoMemoryForMTA, i tought MTA will use as much memory as it needs i have in BIOS 64mb but any game will take as much as it needs even if limit is 64 so when i dont play a game i dont waste ram as video memory. Well at least i have 16 GB of ram so ram wont be a problem. 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now