[Release] EssentialMode base

My game crashes when joining with the updated version, old version worked fine and I installed this the exact same way and I did not forget to use the new SQL. Edit: Sorry I should read better: “From now on EssentialMode is no longer a gamemode, this means that the player won’t spawn if you don’t have another one loaded”

Okay, I so I did /ban ID 50m reason, and it says it expires in 1969.
Hours and days dont default to 1969.
days dont register, they can join back and it doesnt show up in the sql (/ban 5 2d test)
https://gyazo.com/5af5520ec4e69cd928d992bda02ca881

That is because days aren’t build in. Only minutes/hours are. And ofcourse normal seconds, anyhow re-download it and replace sv_admin.lua to make it not 1969.

1 Like

Oh okay, Thanks for fixing it.
Is there any chance of you adding days for the lazy people that don’t want to type out 24h for 1 day or etc?
Also, could you make it where it says how long you were banned for automatically in the reason?
So if you were banned maybe it could say “Banned: (20 minute(s))” or "Banned: (24 hour(s))?
Also, when I first get banned, without being admin it says insert site (where and how do I set that up if you would like to help, if not I understand)
Also, the first time I connect it says i was banned, and if I try again it lets me back in even though my time has expired

Lets put a little disclaimer here:

es_admin IS AN EXAMPLE, it is not supposed to actually be used on servers. I provide no warranty at all if anything goes wrong.

Now we got that out of the way,
It specifies it in the reason if you don’t specify a reason. You need to change insertsite in essentialmode/server/main.lua then line 16.

And no, I won’t build that in, you have todo that yourself.

1 Like

Is there a way to get someone’s player ID with the console?

Type “status” in console.

Is the ban part of this not working for anyone else? Also the report command works but spams my console with tons of errors.

Hi @Kanersps thx for this great gamemod! just tested it and it works great :slight_smile:
i do found an issue regarding the money system.

When the player connects to the server his amount is always 0.
I can change the with the setmoney command and then the amount changes.
but when the player reconnect the value on the screen is back to 0, however in the DB the value is still the correct one.

Is this normal behavior?

Any question related to “money display”, will hereby be removed and you will be warned. If you do not know how to set this up by looking at the code you should not be using EssentialMode. You need to make your own gamemode with this, the display was only there as a nice gesture. And needs to be enabled manually. I will provide no help for this.

1 Like

Thanks for the reply , it actually answered my question :wink:

Not manually as in fucking edit the base code.

1 Like

@Kanersps where did you see me referring to that i would edit the base code?

Also the way you answer questions here is i think the reason why they invented grumpy cat memes :stuck_out_tongue:

What you posted there about changing the variable is absolutely wrong and breaks things.

2 Likes

Could i get a list of the console commands? Im pretty ignorant here. i got everything up and running just dont know the commands…thanks

Kanersps released this as one of the big gamemode examples for fivereborn. He has been stating that if you do not know how to script or setup a database using essentialmode is a bad idea. No reason to complain in the comments that is realistically your responsibility.There are a lot of people that would be willing to help you on the discord in the scripting area but you have to put the effort into actually learning how to script and do it correctly. Also scripting in fivereborn is a LOT of trial and error if you can not be patient and have an open mind nothing will ever go in your favor Streetcorps.

2 Likes

the money icon is in the UI all you’d have to do is code it to display the amount the player has. surley can’t be that hard as there a section in the database already for money. You’ll just have to link them together. Kanersps has released his Base game mode and that is all it is. a Base.
for people to work on top off. give the guy a break this release is amazing!.

Update 1.1.0, 22-02-2017

This update is backwards compatible.

Decription
This update has one main thing which I thought was quite important, essentialmode has default settings now. These settings can be changed by any plugin but they are actually meant to be changed by a gamemode and not by a plugin. Plugins can utilize the session settings.

Features

  • Default settings
  • Session settings

Changed events

-- When this event gets cancelled now it won't display the default permission denied message.
AddEventHandler('es:adminCommandFailed', function(source, command_args, user) end)

New events

-- You can set the default settings with this. The parameter is a table, the settings you want to change can be put in here.
TriggerEvent("es:setDefaultSettings", {})
-- Here is an example usage
TriggerEvent("es:setDefaultSettings", {
    pvpEnabled = true -- Default false
})

-- This is able to set a session setting, this setting is saved until server restart.
TriggerEvent("es:setSessionSetting", key, value)

-- With this you can get the variable that was saved using setSessionSetting, the callback has one parameter which contains the stored value (or nil).
TriggerEvent("es:getSessionSetting", key, callback)

Default settings These are the settings you can change, these are the default values aswell.

settings.defaultSettings = {
	['banReason'] = "You are currently banned. Please go to: insertsite.com/bans", -- The default ban reason, can be a function aswell. The function that gets called has two parameters: function(identifier, username)
	['pvpEnabled'] = false, -- Do you want server-wide pvp
	['permissionDenied'] = false, -- Can be set to a string, this will be displayed if a user tries to run a command it does not have permission to.
	['debugInformation'] = false -- Do you want to log debug information
}
1 Like

Hi Kanersps,

How should I go about hocking into TriggerEvent(‘es:playerLoaded’, source, Users[source]) from a second plugin/gamemode I wrote. Would I need to copy the same logic? :confused: properly not I hope.
How can I do a check on if a user is loaded from a new resource?

-thanks for sharing the release/update and support.

KR,

I know all you say!! This is realy good realese… BUT If the Gamemode is not finish, just say it dont say we understand Nothing :rage: You dont think is better!?

1 Like