FiveM Scripting #1 - First FiveM Script [LUA] [German]

Pubblicato il: 25 luglio 2022
sul canale di: CurryScripts
6,021
132

In this video series, I'll explain how you can learn FiveM Scripting in a simple and thoughtful way !

═════════════════════════════════════

Everything for the Client :

ESX = nil

Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(10)
end
PlayerData = ESX.GetPlayerData()
end)

RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
ESX.PlayerData = xPlayer
end)

RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
ESX.PlayerData.job = job
end)

local filename = function()
local str = debug.getinfo(2, "S").source:sub(2)
return str:match("^./(.).lua$") or str
end
print("^6[CLIENT - DEBUG] ^0: "..filename()..".lua gestartet");

═════════════════════════════════════

Everything for the Config :

local filename = function()
local str = debug.getinfo(2, "S").source:sub(2)
return str:match("^./(.).lua$") or str
end
print("^6[CONFIG - DEBUG] ^0: "..filename()..".lua gestartet");

═════════════════════════════════════

Everything for the Server :

ESX = nil

TriggerEvent("esx:getSharedObject", function(obj) ESX = obj end)

═════════════════════════════════════

Link to the LUA Docs : http://www.lua.org/manual/5.1/de/manu...

═════════════════════════════════════

Link to my Discord :   / discord  

═════════════════════════════════════

There is a lot of work going on in this series of videos so please also give me some feedback to improve some things


In questa pagina del sito puoi guardare il video online FiveM Scripting #1 - First FiveM Script [LUA] [German] della durata di ore minuti seconda in buona qualità , che l'utente ha caricato CurryScripts 25 luglio 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 6,021 volte e gli è piaciuto 132 spettatori. Buona visione!