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

Published: 25 July 2022
on channel: 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


On this page of the site you can watch the video online FiveM Scripting #1 - First FiveM Script [LUA] [German] with a duration of hours minute second in good quality, which was uploaded by the user CurryScripts 25 July 2022, share the link with friends and acquaintances, this video has already been watched 6,021 times on youtube and it was liked by 132 viewers. Enjoy your viewing!