Raised This Month: $ Target: $400
 0% 

Need Testers!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-17-2005 , 16:43   Need Testers!
Reply With Quote #1

Yes currently i cannot run my own server temp....

so could someone test this out?

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 */
Attached Files
File Type: sma Get Plugin or Get Source (cs_cvars.sma - 143 views - 15.3 KB)
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-17-2005 , 16:48  
Reply With Quote #2

This is already done. A much better version too.

I'd test it if it was actually a decent idea and/or well implemented.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-17-2005 , 16:48  
Reply With Quote #3

show me....
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-17-2005 , 16:53  
Reply With Quote #4

http://forums.alliedmods.net/showthread.php?t=335
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-17-2005 , 16:59  
Reply With Quote #5

but tis one has access level cvars
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-17-2005 , 17:00  
Reply With Quote #6

So what. All you need is ADMIN_CVAR no matter what. It's stupid to make shortcuts require a different access level than the long way.

Let's look at it this way:

amx_gravity <> -- ADMIN_BAN
amx_cvar sv_gravity <> -- ADMIN_CVAR

What's the point? All you're doing is making it harder and longer for the admin that's trying to do the cvar.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-17-2005 , 17:07  
Reply With Quote #7

Wow, you're cool, lower my karma for making you look like the dumbass you are.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-17-2005 , 17:21  
Reply With Quote #8

happy now

i scraficed my own karma for yours
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 08-18-2005 , 05:41   Checking if player is just above ground
Reply With Quote #9

I wanna check if player is just above ground. If he is, something will happen. Otherwise, continue with loop.
So I just need to check if player is just above ground, maybe touching it, maybe 1-2 feet above it. If somebody can tell me how, it would be appriciated.
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-18-2005 , 10:53  
Reply With Quote #10

Check their vertical velocity.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode