The Command Console is a tool primarily used for game development. settings.Fair Warning: Use of this command console for gameplay purposes has the potential to ruin any sense of tension or consequences in-game when playing again due to being able to easily bypass events, injuries etc. tJob(value) - Sets the global 'job' to valueĭefault settings These are the settings you can change, these are the default values as well. Will create 2 new functions on the user tGlobal('global', 'default') - See example below Sets a global function on a user, call only once like on es:playerLoaded User.kick(reason) - Kicks user with specified reason User.displayBank(amount) - Same as above for bank, only use if using NativeUI option User.displayMoney(amount) - Used to display amount of money in UI User.addBank(amount) - Adds to the current amount of user bank balance User.removeBank(amount) - Removes from the current amount of user bank balance User.addMoney(amount) - Adds to the current amount of user money User.removeMoney(amount) - Removes from the current amount of user money tBankBalance(amount) - Sets the user bank balance User.get('item') - Can be used for all of the above User.getGroup() - Returns string of a users group User.getIdentifier() - Returns user identifier, most likely hex steamid64 User.getSessionVar(key) - Returns stored session variable User.getCoords() - Returns table(coords.x, coords.y, coords.z) User object (Available functions that you can use on the user) - Getters It will also log some errors that may happen WrappersĬlient wrappers for the user are available now, you can use these by either doing:Ĭlient_script user = exports.essentialmode:getUser() In any file you want to use it in, the previous statement will make the user table available in your entire resource.Īll the current wrappers can be found here You can enable logging by setting the default settings enableLogging to true, when you do that a log file will be created every day with what happened, for example when admin commands are ran or when someone is kicked. On how to implement your own data saving take a look at esplugin_mysql Logging Stop whining at about fucking MySQL kthx.Make sure that your load order is correct, make sure essentialmode starts before esplugin_mysql and MySQL-Async starts before essentialmode.Set this convar in your server configuration: set es_enableCustomData 1.Import the SQL file that comes with esplugin_mysql.Make sure you have MySQL-Async installed and working.Anyway, this comes with a resource that will make MySQL work again for the base data that comes with EssentialMode! Well kind of, there is support for intercepting data and manipulating it yourself. TriggerEvent('es:addCommand', 'command-here-without-slash', function(source, args, user) end, )įinally what people have been wanting, MySQL support. Args is a table with all the arguments, and the user is the user object, containing all the user data. Gets called when a player leaves the server, handy for saving custom data.ĪddEventHandler('es:playerDropped', function(user)end)Īnd these are the ones you can trigger, again from the server. This gets called when a chat message is sent.ĪddEventHandler('es:chatMessage', function(source, command_args, user) end) This gets called when an admin command is ran, but the user does not have permission to run it.ĪddEventHandler('es:adminCommandFailed', function(source, command_args, user) end) (This can be cancelled to not display the message)ĪddEventHandler('es:invalidCommandHandler', function(source, command_args, user) end) Gets called when a non existent command is ran. ![]() Gets called when an admin command is ranĪddEventHandler('es:adminCommandRan', function(source, command_args, user) end) Gets called when a user command is successfully ran.ĪddEventHandler('es:userCommandRan', function(source, command_args, user) end)ĪddEventHandler('es:commandRan', function(source, command_args, user) end) Gets called when the player is initialized.ĪddEventHandler('es:initialized', function(player) end) Gets called when a player is fully loaded.ĪddEventHandler('es:playerLoaded', function(source) end) Note: These are server-sided - Gets called the first time a player spawns in the server.ĪddEventHandler('es:firstSpawn', function(source) end) Usage: EssentialMode has many event handlers, here are the current ones available. Rent a server with EssentialModeĭiscount code: kanersps-a-2529 Updated below for EssentialMode 4+ This package also contains one addon called: “es_admin”, which adds admin commands to your server. This can be used to easily create resources that have to communicate with each other. EssentialMode itself will not do anything of use. Description: EssentiaMode is a base resource which has money and permissions built in.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |