Remove the bridge using a new or existing loading screen resource

Tutoriale, ghiduri de optimizare si suport pentru crearea serverelor.
Post Reply
User avatar
greenie
Full Member
Full Member
Posts: 2948
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Da

Remove the bridge using a new or existing loading screen resource

Post by greenie »

How to remove the bridge from your server loading screen using a new or existing loading screen resource
In this short tutorial, you will learn how to remove the bridge from your server loading screen using a new or existing loading screen resource. For your convenience, code snippets have been provided, and an example is given at the end.

Prerequisites:
A very basic understanding of LUA
Open your loading screen resource, or create a new folder.
Open or create the fxmanifest.lua file.
Add these lines of code:
gist.github.com
https://gist.github.com/cm8263/76fe03e9 ... 84aa170325
fxmanifest.lua
-- Tell server we will close the loading screen resource ourselves
loadscreen_manual_shutdown "yes"
-- Client Script
client_script "client.lua"

fx_version "bodacious"

game "gta5"

Open or create a client.lua file.
Add these lines of code:
github.com
inferno-collection/Loading-Screen/blob/d42a869bda39911507e230727f2deddad7c06b88/[inferno-collection]/inferno-loading/client.lua#L11-L23
-- Variable to check if native has already been run
local Ran = false
-- Wait until client is loaded into the map
AddEventHandler("playerSpawned", function ()
-- If not already ran
if not Ran then
-- Close loading screen resource
ShutdownLoadingScreenNui()
-- Set as ran
Ran = true
end
end)
Start your server and enjoy.
π‘΄π’‚π’šπ’ƒπ’† 𝒕𝒉𝒆 𝑬𝒂𝒓𝒕𝒉 π’Šπ’” 𝒕𝒉𝒆 𝑯𝒆𝒍𝒍 𝒐𝒇 𝑨𝒏𝒐𝒕𝒉𝒆𝒓 𝑷𝒍𝒂𝒏𝒆𝒕... ☒️

βœ… GAZDUIRE JOCURI / VPS / GAZDUIRE WEB / SERVERE DEDICATE - Stock NELIMITAT / Valabil comandati pe https://www.zonek.ro/
Post Reply

Return to β€œServer Development”