View Single Post
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 07-20-2013 , 03:59   Re: [ANY] Admin Funcommands Limiter [UPDATED 19/07/13]
Reply With Quote #11

Feedback as per our IRC discussion:
  1. You might want to look into clientprefs or something to overcome rejoining wiping the limit
  2. You defined a VersionCV variable but never used it (your version cvar is commented out for some reason)
  3. You should be using AddCommandListener, not RegConsoleCmd
  4. Your cvars don't follow any standard naming convention. I'd suggest admin_control_cvarname, like kickcv -> admin_control_kick
  5. You may want to add a cvar to suppress the "You have had x out of y warnings" chat message
  6. Don't return Plugin_Handled or there's a chance that you'll block the base SM plugin from doing its job. Plugin_Continue will suffice.
  7. Using GetClientName at all is unnecessary in this plugin. Just use the %N format specifier. See also: http://wiki.alliedmods.net/Format_Cl...Mod_Scripting)
  8. You're repeating if(CheckCommandAccess(client, "sm_addban", ADMFLAG_RCON, true) && GetConVarInt(AdminControlType) == 1) a lot. You might want to put it into a function.
__________________

Last edited by Dr. McKay; 07-20-2013 at 03:59.
Dr. McKay is offline