[Release] [WIP] ESX 2

Setting up my ESX server now. I really enjoy your plugin on other servers (And just in general). I am really looking forward to having my own ESX server! I hope you continue for a very long time with this awesome plugin. :blush:

Huh? I don’t really understand what you are trying to say… Please reword it if you can, so maybe I can help you out. :wink:

Just go on the GitHub and download it.

i see that but its not set to start in server.cfg, so whats it do? don’t effect running server but do i need it or only if using other scripts?

and @Joseph_Briscoe its in basic server download just re-download the server folder and u see in there in systems folder

Hey guys,
Installing all the functions without the jobs was going ok, but when I try to set me as a police don’t work, the error is in the image on cmd, and the menus aren´t working, just the menu of inventory and the menu of invoices. Please help

I’ve had this happen before I had to redo the shops and items table

Hi there everyone!

Could someone help me figure out how to implement ESX payment in a script?

In my server/main.lua, I have the following:

ESX = nil

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

RegisterServerEvent("makepmnt")
AddEventHandler("makepmnt", function(amnt)
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	xPlayer.addMoney(amnt)
end)

And in my C# script where the payment should occur, I have:

BaseScript.TriggerServerEvent("makepmnt", "5000");

I’m not getting any errors either at compile or in F8 but the payment is not being made.

Can someone tell me what I’m doing wrong or missing?

Thanks for your time!

Hi,
I have two problems that can be related.

The first is with esx_shops, I have an error message in the F8 menu at startup. see screenshots.
The stores are functional when they want.

Screenshot:
https://postimg.cc/image/ntq4r4dzf/
https://postimg.cc/image/524bino13/

AND
The second is with es_extended, I have an error message in the F8 menu at startup.
Screenshot:
https://postimg.cc/image/4bvhb746z/

Please, help me if you have the solution, it’s been over a week that I’m looking for, the top.

local money = xPlayer.get(‘money’) <----- server.lua:3: in main chunk
local bank = xPlayer.getAccount(‘bank’).money

We use ESX and I need the right code for “local money” got this error:

… server.lua:3: attempt to index a nil value (global ‘xPlayer’)
stack traceback: server.lua:3: in main chunk

Thx for helping! @GiZz

Hi there everyone!

Is there a way to convert this to provide infinite ammo?

xPlayer.addWeapon(itemName, 1000)

Why does my server forget what I look like when I die but remember again if I disconnect and reconnect?

I was trying to figure out why players were losing all their weapons on death so I disabled Mello trainer, which did solve the issue of weapons disappearing on death but brought another issue to light: When the trainer is disabled, if a player dies, they come back to life with a random skin. If they disconnect and reconnect, the game again remembers what they looked like originally… until they die again.

Could someone tell me what resource might be causing this behavior and how I could fix it to where the player continues to look the same after death?

server resources:

start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start ■■■■■■■
start scoreboard
start playernames
#inserted trough ZAP ressourcesystem
start mysql-async
start essentialmode
start esplugin
start es_admin2
## From ESX Pack ##
start async
start cron
start es_extended
start esx_barbershop
start esx_billing
start esx_clotheshop
start esx_datastore
start esx_garage
start esx_identity
start esx_lscustom
start esx_menu_default
start esx_menu_dialog
start esx_menu_list
#start esx_property
start esx_shops
start esx_sit
start esx_skin
start_esx_society
start esx_vehicleshop
start esx_weashops
start es_camera
start instance
start skinchanger
## End of ESX Pack ##

#start mellotrainer
start bob74_ipl
start mrp-missions-2.2
start coordsaver
start loadingscreen
start freemode-remix
start trains
start cnrvehicles
start eden_animal
start assault_vehicles
start esx_eden_boatgarage
start esx_eden_aircraftgarage
start esx_aircraftshop
start esx_boatshop

Thanks for your time!

How Do I Set My Self As Admin On ESX

Users table of the database under groups set as superadmin and permissions to 9

in server.cfg remove # at front and just change the # after admin to level you want, or what DrDJ says, in database

For anyone that has the same problem, I fixed it with the help of this post.

Is there a way to change the inventory key (F2), i successfully changed the F1 key but i dont know where i can find the F2 key

It looks like you can do that in /es_extended/client/main.lua line 474:

    if IsControlPressed(0, Keys["F2"]) and GetLastInputMethod(2) and not isDead and not ESX.UI.Menu.IsOpen('default', 'es_extended', 'inventory') and (GetGameTimer() - GUI.Time) > 150 then
1 Like

Hello someone know how to add an image at the top of the menu like that : http://prntscr.com/jnokz2
I saw something like img = ‘image.png’

But where i place the files and is it correct ?

Hopefully this is the correct place to ask. I am running a Fivem server through a VPS that currently only have the base files on it(Can show my config if needed.) When i try to launch in, i get a the https://cdn.discordapp.com/attachments/416213218516533250/450749978038501387/unknown.png
then it just sits there for a few minutes, and then i get https://cdn.discordapp.com/attachments/427871562860068879/450717047152836621/unknown.png

Other members of my server can load in just fine, and they load in quickly, but i am unable to

Hi there,

I was told to add this to the client side of scripts to convert it to ESX compatible:

ESX = nil

Citizen.CreateThread(function()
	while ESX == nil do
		TriggerEvent(‘esx:getSharedObject’, function(obj) ESX = obj end)
		Citizen.Wait(0)
	end
end)

But when I do this, the script breaks. Could someone tell me what I’m doing wrong so I can utilize client side ESX notifications and stuff?

Thanks for your time!