[Release] EssentialMode base

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

I Signed up just to reply to youā€¦
I donā€™t think you understand that this is not a game mode, rather a tool to make your life a LOT easier in making a game modeā€¦ if it makes you angry, donā€™t use itā€¦ Itā€™s quite simply really.

In other news, great release, thanks heaps for this @Kanersps

Im not angryā€¦ Just I like we say to me the true!
And I never say is bad realeseā€¦

For some reason with the new update, players join but get stuck on the loading screen and then their game crashes? My SQL database is fine, set up the login.lua and es_admin login details, I also imported the new .sql file.

Edit: I believe itā€™s because __resource.lua is missing the game type at the top.
Edit 2: Nevermind, that didnā€™t fix it.

1 Like

As this isnā€™t a gamemode? See the latest patch notes. You need your own gamemode to actually spawn people.

1 Like

Yeah I noticed now, I just tried to get the example gamemode to work but it still crashes?

I have the same problemā€¦

When I outcomment the ā€œexample_gamemodeā€ resource it loads just fine

when i try click properties on mysql.data.dll i donā€™t see any block or unblock button ā€¦ is there any other solutionā€¦ ?

Iā€™m running a sever from a server provider. Can I edit the sql on my computer and then copy it to the server and it still work?

Ask your server provider?

1 Like

I think you need change folder acces not file /essentialmode/lib/ :wink:

How do I use the getSessionSetting?