Registration ver. 1.0.1
PHP Code:
/*This Plugin Was Created By Scriptxxcaz
*
* Credits
* -------
* Special Thanks to Allied Modders Forums for helpful and useful information.
*
*
* This plugin was created to do the following:
* -------------------------------------------
* Prevent stolen accounts from being used in servers. [Request in the Allied Modders Forums]
*---------------------------------------------------------------------------------------------------
*---------------------------------------------------------------------------------------------------
*
* Description:
* When a player enter's the server he/she must register within a certain
* amount of minutes or he/she will be kicked. A menu will pop-up asking
* to confirm password or re-type a new password. If confirmed, the
* players name,id, and password will be stored in a file. If the player
* chooses to re-type the password, he/she will be asked to re-register.
* If he/she re-registers, he/she will have to register within a certain amount of minutes
* and login within a certain amount of minutes or be kicked. If the
* player is already registered he/she must login within a certain
* amount of minutes or he/she will be kicked. The amount of minutes can
* be changed as desired. If a player has forgotten his/her password, he/she
* can ask an admin to reset their password if rg_resetacc = 1. If rg_resetacc = 2,
* the player can reset his,her password themselves. This is done by the rg_resetpass <name>
* command. This command over writes that players password as "default" and the
* player is asked to re-register. He/she must re-register and login within a certain
* amount of minutes or be kicked. If kicked or disconnect before re-registering,
* when they re-enter they will be asked to register. A userlist can
* be obtained to show player's steam id's that are in the server.If file doesn't exist
* the file will be created when the plugin is first ran.*/
Command's
---------
say /register <password> -registers a user. writes the players name,id, and password to file.
say /login <password> -logs a user in. if the password is same as the password in the registration file, player is then logged in.
say /userlist -shows player id's of the players in the server
Console Command's
-----------------
rg_resetpass -resets a players password(player must be in server). Writes "default" as their pass in the file.
***If the player disconnects before re-registering when they reconnect they will be asked to register.***
rg_useracc -sets the access to admin only or all player access. This is used for setting the access on user list(Admin only command)
Uses mp_useracc CVAR
rg_resetacc -sets the access to admin only or all player access. This is used for setting the access on rg_resetpass(Admin only command)
Uses mp_reseracc CVAR
**Note access to these commands are use with #define ADMIN. This can be changed to any admin level of your choice.**
CVAR's
------
mp_useracc -1 = admins only / 2 = all players
mp_resetacc -1 = admins only / 2 = all players
mp_logmin -sets the time that players have to login or the player will be kicked
mp_regmin -sets the time that players have to register or the player will be kicked
version 1.0.1
----------
Fixed login time and register time. -The set_task timer's are now set by cvar's.
Fixed chat. -[Registration] is green and the rest of the text is in yellow
**P.S. version 1.0.5 will have an agreement show when you join a team(optional, set by cvar). If you agree to the agreement, then you will have to register and login. If you were already registered, this agreement will not show for you; therefor you wont have to do anything accept login. If you disagree, you will be allowed to play on the server.(A cvar can also be set to kick a player if he/she disagree's).I believe the newer version will be more user friendly and will not force players to register if they choose not to.**