Yes currently i cannot run my own server temp....
Code:
/* AMX MOD X Script (c) 2005 Zenith77
* **This file is provided as is with no warranites**
*
* Plugin by Zenith77
* --| DESCRIPTION |--
*
* Admins that dont have rcon access and are of ADMIN_BAN or higher are
* now able to change cvars.... Or you could redifine the access level to what you want
* this makes it easier anyway than having to type amx_rcon blahl blah blah
* You can also change the access level with amx_access_level, see the commands
* section for more info!
*
* --| COMMANDS |--
* ****
* amx_access_level (1 ADMIN_ADMIN, 2 ADMIN_KICK, 3 ADMIN_BAN, 4 ADMIN_RCON, 5 ADMIN_IMMUNITY)
* amx_roundtime -- amx_freezetime -- amx_c4timer -- amx_startmoney -- amx_restartround --
* amx_timelimit -- amx_airaccelerate -- amx_restartround -- amx_gravity --
* amx_autoteambalance --
*
* --| VERSIONS |--
* 1.0 - Private Testing
* 2.0 - Current Version
*
* --| TO DO |--
* V. 2.0 -- Add cvar that allowes admins to define the access level 50% complete
* V. 2.0 -- Add cvars to control mins and maxs of cvars.... (cshack module)
*/
new cvar_access
#include <amxmodx>
#include <amxmisc>
new cvar_access
public plugin_init() {
register_plugin( "CS CVARS", "1.0", "Zenith77" )
register_cvar( "amx_access_level", "2" ) //-- ADMIN_BAN
register_concmd( "amx_roundtime", "mp_roundtime", "<minutes> changes how long the rounds are" )
register_concmd( "amx_freezetime", "mp_freezetime", "<seconds> changes how much freezetime there is" )
register_concmd( "amx_c4timer", "mp_c4timer", "<seconds> changes how when the bomb explodes" )
register_concmd( "amx_startmoney", "mp_startmoney", "<amount> changes mp_startmoney" )
register_concmd( "amx_restartround", "sv_restartround", "<seconds>restarts the round" )
register_concmd( "amx_timelimit", "mp_timelimit", "<minutes> changes how long the map is" )
register_concmd( "amx_airaccelerate", "sv_airaccelerate", "<amount> changes sv_airaccelerate" )
register_concmd( "amx_gravity", "sv_gravity", "<amount> changes the severs gravity" )
register_concmd( "amx_autoteambalance", "mp_autoteam", "<value> set to 1 to turn on team balancing" )
}
public mp_roundtime(id) {
cvar_access = get_cvar_num("amx_access_level")
if( cvar_access == 1 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_ADMIN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 2 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_KICK ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 3 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_BAN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 4 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_RCON ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 5 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_IMMUNITY ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
new arg[32]
read_argv( 1, arg, 31 )
server_cmd( "mp_roundtime %s", arg )
client_print( 0, print_chat, "[AMXX] Round Time changed to %s", arg )
return PLUGIN_HANDLED
}
//----------------------------------------------
//==============================================
//----------------------------------------------
public mp_freezetime(id) {
cvar_access = get_cvar_num("amx_access_level")
if( cvar_access == 1 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_ADMIN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 2 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_KICK ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 3 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_BAN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 4 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_RCON ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 5 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_IMMUNITY ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
new arg[32]
read_argv( 1, arg, 31 )
server_cmd( "mp_freezetime %s", arg )
client_print( 0, print_chat, "[AMXX] Freeze Time changed to %s", arg )
return PLUGIN_HANDLED
}
//----------------------------------------------
//==============================================
//----------------------------------------------
public mp_c4timer(id) {
cvar_access = get_cvar_num("amx_access_level")
if( cvar_access == 1 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_ADMIN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 2 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_KICK ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 3 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_BAN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 4 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_RCON ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 5 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_IMMUNITY ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
new arg[32]
read_argv( 1, arg, 31 )
server_cmd( "mp_c4timer %s", arg )
client_print( 0, print_chat, "[AMXX] c4timer changed WATCH OUT!" ) // put this sever to 0 for the unsuspecting planter
return PLUGIN_HANDLED
}
//----------------------------------------------
//==============================================
//----------------------------------------------
public mp_startmoney(id) {
cvar_access = get_cvar_num("amx_access_level")
if( cvar_access == 1 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_ADMIN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 2 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_KICK ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 3 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_BAN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 4 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_RCON ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 5 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_IMMUNITY ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
new arg[32]
read_argv( 1, arg, 31 )
server_cmd( "mp_startmoney %s", arg )
client_print( 0, print_chat, "[AMXX] Start Money changed to %s", arg )
return PLUGIN_HANDLED
}
//----------------------------------------------
//==============================================
//----------------------------------------------
public sv_restartround(id) {
cvar_access = get_cvar_num("amx_access_level")
if( cvar_access == 1 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_ADMIN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 2 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_KICK ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 3 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_BAN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 4 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_RCON ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 5 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_IMMUNITY ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
new arg[32]
read_argv( 1, arg, 31 )
server_cmd( "sv_restartround %s", arg )
client_print( 0, print_chat, "[AMXX] Round restart in %s seconds!", arg )
return PLUGIN_HANDLED
}
//----------------------------------------------
//==============================================
//----------------------------------------------
public mp_timelimit(id) {
cvar_access = get_cvar_num("amx_access_level")
if( cvar_access == 1 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_ADMIN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 2 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_KICK ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 3 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_BAN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 4 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_RCON ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 5 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_IMMUNITY ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
new arg[32]
read_argv( 1, arg, 31 )
server_cmd( "mp_timelimit %s", arg )
client_print( 0, print_chat, "[AMXX] Time Limit changed to %s", arg )
return PLUGIN_HANDLED
}
//----------------------------------------------
//==============================================
//----------------------------------------------
public sv_airaccelerate(id) {
cvar_access = get_cvar_num("amx_access_level")
if( cvar_access == 1 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_ADMIN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 2 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_KICK ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 3 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_BAN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 4 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_RCON ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 5 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_IMMUNITY ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
new arg[32]
read_argv( 1, arg, 31 )
server_cmd( "sv_airaccelerate %s", arg )
client_print( 0, print_chat, "[AMXX] Airaccelerate changed to %s", arg )
return PLUGIN_HANDLED
}
//----------------------------------------------
//==============================================
//----------------------------------------------
public sv_gravity(id) {
cvar_access = get_cvar_num("amx_access_level")
if( cvar_access == 1 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_ADMIN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 2 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_KICK ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 3 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_BAN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 4 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_RCON ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 5 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_IMMUNITY ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
new arg[32]
read_argv( 1, arg, 31 )
server_cmd( "sv_gravity %s", arg )
client_print( 0, print_chat, "[AMXX] Gravity changed to %s", arg )
return PLUGIN_HANDLED
}
//----------------------------------------------
//==============================================
//----------------------------------------------
public mp_autoteam(id) {
cvar_access = get_cvar_num("amx_access_level")
if( cvar_access == 1 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_ADMIN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 2 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_KICK ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 3 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_BAN ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 4 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_RCON ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
if( cvar_access == 5 ) {
get_user_flags(id)
if( get_user_flags(id) != ADMIN_IMMUNITY ) {
client_print(id, print_console, "[AMXX] You do not have access to that command!")
return PLUGIN_HANDLED
}
}
new arg[32]
read_argv( 1, arg, 31 )
server_cmd( "mp_autoteambalance %s", arg )
client_print( 0, print_chat, "[AMXX] Auto Team Balance changed to %s", arg )
return PLUGIN_HANDLED
}
/*
END FILE
*/