
   /* AMX MOD script.
   *
   ----------------------------------------------------------------------
   -----
   *
   * Plugin: commoncommands.amx
   * Author: Toverand
   * Contact: Toverand@hotmail.com
   * Date: November 12, 2002
   *  Compatibility: Created on AMX .61 and recently tested on 0.9.2 with
   full operation
   * Information:
   *   - Provides a reusable structure to run any number of commands
   *   -  Commands  are  used  as if you are using rcon without having to
   type  rcon(ex.  mp_timelimit  30 rather than "rcon mp_timelimit 30" or
   "amx_timelimit 30")
   *   -  Comes  with  some  common CS Commands registered...but they can
   easily be changed to any MOD's CVARS
   *
   *
   ----------------------------------------------------------------------
   -----
   */
   #include <amxmod>
   #include <amxmisc>
   public amx_commands(id,level,cid) {
       if (!cmd_access(id,level,cid,1))
           return PLUGIN_HANDLED
       if (read_argc() > 1) {
           new command[32], variable[32]
           read_argv(0,command,31)
           read_argv(1,variable,31)
           set_cvar_string(command,variable)
           console_print(id,"^"%s^"       has       been      set      to
   ^"%s^"",command,variable)
           return PLUGIN_HANDLED
       }

       new command[32], variable[32]
       read_argv(0,command,31)
       get_cvar_string(command,variable,31)
       console_print(id,"^"%s^" is set to ^"%s^"",command,variable)
       return PLUGIN_HANDLED
   }
   public plugin_init(){
       register_plugin("Common Commands","1.1","Toverand")
       register_clcmd("sv_restart","amx_commands",ADMIN_LEVEL_A,"<#second
   s>")
       register_clcmd("sv_restartround","amx_commands",ADMIN_LEVEL_A,"<#s
   econds>")
       register_clcmd("sv_gravity","amx_commands",ADMIN_LEVEL_A,"<#>
   (default=800)")
       register_clcmd("sv_airaccelerate","amx_commands",ADMIN_LEVEL_A,"<#
   > (default=10)")
       register_clcmd("mp_timelimit","amx_commands",ADMIN_LEVEL_A,"<#minu
   tes>")
       register_clcmd("mp_roundtime","amx_commands",ADMIN_LEVEL_A,"<#minu
   tes>")
       register_clcmd("mp_buytime","amx_commands",ADMIN_LEVEL_A,"<#minute
   s> (for seconds use .5 etc.)")
       register_clcmd("mp_freezetime","amx_commands",ADMIN_LEVEL_A,"<#sec
   onds>")
       register_clcmd("mp_c4timer","amx_commands",ADMIN_LEVEL_A,"<#second
   s> - CS Command")
       register_clcmd("mp_maxrounds","amx_commands",ADMIN_LEVEL_A,"<#roun
   ds>")
       register_clcmd("mp_forcecamera","amx_commands",ADMIN_LEVEL_A,"<2-t
   eam only/1-any player/0-off>")
       register_clcmd("mp_forcechasecam","amx_commands",ADMIN_LEVEL_A,"<2
   -team only/1-any player/0-off>")
       register_clcmd("mp_fadetoblack","amx_commands",ADMIN_LEVEL_A,"<1-o
   n/0-off> - CS Command")
       register_clcmd("mp_friendlyfire","amx_commands",ADMIN_LEVEL_A,"<1-
   on/0-off>")
       register_clcmd("mp_limitteams","amx_commands",ADMIN_LEVEL_A,"<# of
   players 1 team can have over the other/0-off>")
       register_clcmd("mp_tkpunish","amx_commands",ADMIN_LEVEL_A,"<1-on/0
   -off>")
       register_clcmd("mp_hostagepenalty","amx_commands",ADMIN_LEVEL_A,"<
   # of hostages killed before kicking player/0-off> - CS Command")
       register_clcmd("allow_spectators","amx_commands",ADMIN_LEVEL_A,"<#
   of specators to allow>")
       return PLUGIN_CONTINUE
   }
