[Release] EssentialMode base

Yes the Id of the user on the server so if ur Id in status is 2 u would put the number 2 in the pic above ur id is 5

1 Like

can i install this on the zap hosting gameserver? because i dont see how to setup couchdb

Couchdb is it’s own program u need to find out if ur host supports CouchDB if not then use Mysql as most hosting providers do

How can I make my Script reloader bypass essentialmode? So I can restart my gasstations so my prices randomize. Thanks in advance.

Alright, so I’ve got couchDB set up and put in the credentials as a convar but it says there was an error detected in authentication.

set es_couchdb_url "127.0.0.1"
set es_couchdb_port "5984"
set es_couchdb_password "fivem:***"

Is that not correct? I originally tried without quotes and still didn’t work.

So can we get confirmation that the errors I’ve been receiving are in actual fact due to an outdated version of essentials?

Where exactly do I connect to the DB? the login.lua has been changed and now i cant find where to connect to the DB

i have all this setup and database setup thru XAMPP…how do is et myself as superadmin cause when i get on server, it has me as user and i need to be able to assign roles such as cop. I have googled and tried looking everywhere…i have easy admin and gave myself admin but the server itself shows me as user…any help will be greatly appreciated!

or can tell me where in either client.lua or server.lua in es_admin2 folder that i can add my steam id and give myself super admin would be super helpful

Hey @Dre1980,

When your server is running, in the terminal window that pops up if you press enter it will allow you to enter commands via the command line cfx>.

You can set admin levels and groups by the following commands:

setadmin <ID> <LEVEL>
(Example: setadmin 1 10)

setgroup <ID> <GROUPNAME>
(Example: setgroup 1 superadmin)

Hopefully that helps you out mate!

Hey @rhys19,

Setting up couchdb is as simple as downloading a free program and installing it. If you find it easier to follow along a video while you install it check this video out on youtube. This is a very straight forward way to get it installed and working in under 5 minutes.

Good luck and have fun!

How can i use essentialmode base without couchDB? I want to have sql version.

well yes i know but i own a linux vps and the couchdb wont work on it for some reason and i had zap untill ovh fixed my issue which took a couple days and i used to have couchdb for ubuntu server 14.04 and i had to reinstall the ubuntu software and now i need to figure out where i got the install instructions from lol :joy:

How can i show my dirtymoney value on hud?

Instructions are posted on how to use MySql instead of couchDB please read the first post again and follow the tutorial

How do I add admins tags like the previous Freeroam?

I have the code here, I just don’t know where to add it or how to add it into essential, can someone help me please

	if(isLoggedIn(source))then
		local adminlevel = tonumber(Users[GetPlayerName(source)]['admin'])
		
		if(adminlevel == 1)then
			tag = "MODERATOR"
			color = {0, 0, 255}
		elseif(adminlevel == 2)then
			tag = "ADMINISTRATOR"
			color = {255, 0, 0}
		elseif(adminlevel == 3)then
			tag = "SUPERADMIN"
			color = {255, 0, 0}
		elseif(adminlevel > 3)then
			tag = "OWNER"
			color = {255, 0, 0}
		end
	
		TriggerClientEvent('chatMessage', -1, tag .. " | " .. GetPlayerName(source), color, message)
	end

Hey. When I try to use any command within es_admin2 I get this error in my chat and the command doesn’t work.

[MY SERVER IP]> kick 3 test
Error running call reference function for resource essentialmode: server/main.lua:212: attempt to index a nil value (field ‘?’)
stack traceback:
server/main.lua:212: in local ‘ref’
citizen:/scripting/lua/scheduler.lua:277: in function citizen:/scripting/lua/scheduler.lua:268

anyone know how to remove names from heads in essential mode since i installed essential mode they have added again

when i load into my server es_admin2 gives me this in the console.
InvokeNative: execution failed: type must be object, but is array
Error running system event handling function for resource essentialmode: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: Execution of native 000000008e8cc653 in script host failed.
stack traceback:
[C]: in upvalue ‘_in’
citizen:/scripting/lua/natives_server.lua:190: in function ‘PerformHttpRequestInternal’
citizen:/scripting/lua/scheduler.lua:233: in function ‘PerformHttpRequest’
server/classes/player.lua:233: in function ‘CreatePlayer’
server/player/login.lua:10: in upvalue ‘callback’
server/db.lua:245: in upvalue ‘callback’
server/db.lua:84: in field ‘?’
citizen:/scripting/lua/scheduler.lua:219: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:124: in function citizen:/scripting/lua/scheduler.lua:123
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:39: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:123: in function citizen:/scripting/lua/scheduler.lua:92

I have the same issue!
esadmin

Can someone help us? :frowning: