- I give permission for this addon to be reused, modified, or ported by anyone
-
- Yes
- I understand my submission will be rejected if it does not follow forum rules, Submissions guidelines, and/or file name conventions
-
- Yes
StuffAccounts
Script for co-op game type. Players can create an account and save stuff in their accounts.(The player registers his account and login) | (Stuffs are returned to the player after server restart) |
The script is automated, if the player registers his account, he automatically enters his account if he rejoin the game. Saves the player's data such as: points, lives, rings, skipscrap and admin if the player has it. There is also a command "do_autoreg" that automatically registers players if they do not have accounts.
Here is a list of commands for this script!
Var name | Description | Possible value | Default value |
---|---|---|---|
do_autoreg | automatically registers accounts for players | On/Off | Off |
do_stufflog | writes logs when a player saves their items | On/Off | Off |
do_accountlog | writes logs when a player creates or changes a password | On/Off | Off |
do_setadmin | returns admin if enabled | On/Off | Off |
Player commands:
-- "ac_register" - registers on the server;
-- "ac_login" - Login to account;
-- "ac_changepass" - Changes password
NOTE: You need to edit the script so as not to conflict with other servers!
Open the script:
StuffAccounts.lua:
...
-- NOTE: Do not use symbols such as / \ | < > * : ? ^ "
local stuff_servername = "SRB2 Server"
-- Folder where accounts will be saved.
local folderstuff = "StuffAccounts/Accounts/"
-- The folder in which the player saves the username and password for HIMSELF.
local client_folderstuff = "client/StuffAccounts/"..stuff_servername.."/login/account.dat"
...
local stuff_servername = "SRB2 Server"
.Where "SRB2 Server" should be replaced with another name, for example: "My cool server". You should get it like this:
local stuff_servername = "My cool server"
.
StuffAccounts_Edit.lua:
...
-- NOTE: Do not use symbols such as / \ | < > * : ? ^ "
local stuff_servername = "My cool server"
...
Congratulations! Now the players will not yell at you that they have lost access to their account because they do not remember their password.