We have released new updates to our production branch. This includes mainly fixes and internal improvements, and one new feature.
Changelog
-
citizen:server:net: http handler -
server impl component -
server working up to the initial handshake -
clean up GameServer -
add intel tbb submodule -
working fxserver handshake! -
optimization and fixes -
client->SendData() -
resource system bringup -
fix current-manager issues - the above stuff is for the new server, to be released in the future
-
update CitizenFX.Core.dll - now you can dynamically add/remove BaseScript instances
-
code commits - the .NET changes
-
update natives.lua - for the font natives
-
font natives, backend -
fix ZLIB_2 error for .gfx files - Now, you can load
.gfxfiles from the server! -
natives for fonts - See below for details.
-
fix use of uninitialized rscFlags - Part of the above .gfx fix.
-
current manager in ResetResources - Fixes a crash on exit.
-
crashometry - This taught us that the top crashes are caused by joining multiple servers in a row.
-
steam: old steam isn't used anymore, remove - tl;dr: valve changed something, so your in-mod was called â1â or blank
-
corert: safe NtClose hook - no more crashes with Comodo! on to the next one.
-
resources: don't load resources above 16 MB - because people seem to forget.
-
resources: extra MakeCurrent calls - es_turfwars should work again
-
add editorconfig file -
change indentation - uh, dev stuff?
-
gitlab ci: don't cache vendor - builds took too long
-
launcher: load dinput8.dll from system - why did it load asi loaders? no idea
-
launcher: remove manifested dpi-awareness -
launcher: set DPI-awareness for main process - fixes Problem: Mouse won't move a certain way right, or down - thanks to @Polkakos for reporting this
Developer changes
Two new natives. Theyâre for adding fonts for use by text draw commands.
How to add fonts
-
Convert your .ttf to a .swf. You can use
swfmill(http://swfmill.org/releases/swfmill-0.3.3-win32.zip) to do this:swfmill simple in.xml out.swf -
Convert the .swf to .gfx. You need
gfxexport.exefor this. We can not tell you where to get this, as itâs illegal to spread - find it on Google.gfxexport out.swf -
Put
out.gfxin astream/folder in a resource, perhaps rename it. -
Call
RegisterFontFileandRegisterFontIdfrom a client script. -
Use the registered ID in
SetTextFont, instead of one of the gameâs built-in IDs.
in.xml
<?xml version="1.0" encoding="iso-8859-1" ?>
<movie version="8" width="320" height="240" framerate="12">
<frame>
<library>
<font id="Fira Sans" import="fs.ttf" name="Fira Sans"/>
</library>
</frame>
</movie>
example.lua
local fontId
Citizen.CreateThread(function()
RegisterFontFile('out') -- the name of your .gfx, without .gfx
fontId = RegisterFontId('Fira Sans') -- the name from the .xml
while true do
Wait(0)
SetTextFont(fontId)
BeginTextCommandDisplayText('STRING')
AddTextComponentString('Hello, world!')
EndTextCommandDisplayText(0.5, 0.5)
end
end)
