THIS HAS A NEW HOME link
Ichthys Admin Script v1.0
Overview: This script pack has two was of determining whether a player is admin or not.
- 1) via a list of steamid's in admins.cfg
2) Checks if a player has rcon access.
These both occur when a player connects. Then once their admin status has been established its saved as a userid specific variable which can be checked any event with a userid Like player_say.
Installation
1) Copy / Upload the ichy_admincheck folder to your events directory.
2) Add this to your autoexec.cfg (not server.cfg)
Code:
//Ichthys' Admin Check
//Make you you have eventscripts_subdirectory already defined before this.
eventscripts_register ichy_admincheck
- SteamID Configuration:
In the script packs server.cfg. Leave 'admincheck_type' as 'steamid'.
Add your admins steamid's to the admins.cfg file. The last steamid must be "end". This marks the end of the admin list.
- Rcon Configuration:
In the script packs server.cfg. Change 'admincheck_type' to 'rcon' to use this method. Then change the admincheck_rcon and admincheck_exec in the rcon_server.cfg to the rcon and exec commands you use.
Usage:
In any event that has a userid. use the command 'admincheck'. This will check whether the user as authenticated as an admin when they connected. If they are an admin, the cvar 'admin' will return as '1'.
Example:
player_say.cfg
Code:
if (event_var(text) equalto admin) then admincheck
if (event_var(text) equalto admin) then if (server_var(admin) equalto 1) then es_msg #green Respect event_var(es_username) 's authority!