To execute AMX commands through client console (i.e in-game) you need to have Admin access on the server.You can add admins on your server by editing users.ini as follows. File users.ini is located in your HLDS folder
- Add Admins at the bottom of users.ini with format
<name|ip|steamid> <password> <access flags> <account flags>
- Enter 1 entry per line separating the four fields with a space eg.
"Noobstrike" "pass" "abcdefghijklmnopqrstu" "a" "STEAM_0:0:123456" "" "abcdefghijklmnopqrstu" "ce" "22.214.171.124" "" "abcdefghijklmnopqrstu" "de"
To connect to server as a admin users have to type
setinfo "_pw" "pass"
in console before connecting to the server or put the above code in config (eg. config.cfg).
- Restart the server or type amx_reloadadmins in console to load new users.ini
|a||immunity (can’t be kicked/baned/slayed/slaped and affected by other commmands)|
|b||reservation (can join on reserved slots)|
|d||amx_ban and amx_unban commands|
|e||amx_slay and amx_slap commands|
|g||amx_cvar command (not all cvars will be available)|
|i||amx_chat and other chat commands|
|j||amx_vote and other vote commands|
|k||access to sv_password cvar (by amx_cvar command)|
|l||access to amx_rcon command and rcon_password cvar (by amx_cvar command)|
|m||custom level A (for additional plugins)|
|n||custom level B|
|o||custom level C|
|p||custom level D|
|q||custom level E|
|r||custom level F|
|s||custom level G|
|t||custom level H|
|z||user (no admin)|
Account /Connection Flags
|a||disconnect player on invalid password|
|c||this is steamid/wonid|
|d||this is ip|
|e||password not checked (only name/ip/steamid needed)|
In <name|ip|steamid> field you can add any name , IP or steam id. To add host as admin type loopback in this field.
To Remove an Admin you can delete that line or put a semi-colon in front of the line.
Adding Admins via Console
You can also add admins via console command amx_addadmin eg.
amx_addadmin "noob" "abcdefghijklmnopqrstu"
Type amx_reloadadmins in console after editing users.ini or restart your server.