Raised This Month: $51 Target: $400
 12% 

(JustinHoMi) Admin Gravity


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands       
[nFb]GraveKeeper
Senior Member
Join Date: Mar 2004
Location: Connecticut, U.S.A.
Old 03-30-2004 , 00:41   (JustinHoMi) Admin Gravity
Reply With Quote #1

Allows you to easily change the gravity. Players can also say /gravity to see what the current gravity is set at.

Usage: amx_gravity <value>
Attached Files
File Type: sma Get Plugin or Get Source (admin_gravity.sma - 1973 views - 1.0 KB)
File Type: zip admin_gravity.zip (1.7 KB, 492 views)
[nFb]GraveKeeper is offline
Send a message via AIM to [nFb]GraveKeeper
SniperBeamer
AMX Mod X Founder
Join Date: Jun 2003
Location: Good Old Europe
Old 03-30-2004 , 07:32  
Reply With Quote #2

Code:
server_cmd("sv_gravity %s",gravity)
should be
Code:
set_cvar_num("sv_gravity",gravity)
__________________
SniperBeamer is offline
[nFb]GraveKeeper
Senior Member
Join Date: Mar 2004
Location: Connecticut, U.S.A.
Old 03-30-2004 , 09:26  
Reply With Quote #3

I tested it out and it works. If I change the plugin as you state then it won't compile.
[nFb]GraveKeeper is offline
Send a message via AIM to [nFb]GraveKeeper
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 05-02-2004 , 06:20  
Reply With Quote #4

Try this code out.
Code:
/* * * AMX_GRAVITY *  by JustinHoMi * */ #include <amxmodx> public admin_gravity(id,level){     if (!(get_user_flags(id)&level)){             console_print(id,"[AMX] You have no access to that command.")             return PLUGIN_HANDLED         }     if (read_argc() < 2){             new gravity_cvar = get_cvar_num("sv_gravity")             console_print(id,"[AMX] ^"sv_gravity^" is ^"%i^"",gravity_cvar)             return PLUGIN_HANDLED     }     new gravity[6]     read_argv(1, gravity, 5)     set_cvar_num("sv_gravity", str_to_num(gravity))     console_print(id,"[AMX] Gravity has been set to %s",gravity)     return PLUGIN_HANDLED } public check_gravity(id){     client_print(id,print_chat,"[AMX] The gravity is set at %i", get_cvar_num("sv_gravity"))     return PLUGIN_HANDLED } public plugin_init(){     register_plugin("Admin Gravity","0.2","JustinHoMi")     register_concmd("amx_gravity","admin_gravity",ADMIN_CVAR,"< gravity >")     register_clcmd("say /gravity","check_gravity")     register_clcmd("say_team /gravity","check_gravity")     return PLUGIN_CONTINUE }
Johnny got his gun is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 03-30-2005 , 15:01  
Reply With Quote #5

well this is an OK plugin. It works and all but there are already plugins that exist with the command amx_gravity in them like "All in One" plugin
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
pendragon
Senior Member
Join Date: Mar 2004
Location: In a bubble
Old 03-30-2005 , 16:02  
Reply With Quote #6

Quote:
Originally Posted by GHW_Chronic
well this is an OK plugin. It works and all but there are already plugins that exist with the command amx_gravity in them like "All in One" plugin
actually - in case you forgot - there are other mods out there that are NOT CS and this plugin would be very useful for some server ops that dont want to give out RCON access but still want their admins to be able to set gravity.

The "All in One" plugin you are probably refering to is BigBaller's CS one and that wouldnt work for a DoD server - and Zor's "All in One" plugin for DoD doesnt have a gravity command. So - this is in fact a very useful plugin....

______

By the way - this isn't CS dependant.
__________________
pendragon is offline
Send a message via ICQ to pendragon
The-56k-LaggA
Senior Member
Join Date: Apr 2004
Location: Germany, Hanover
Old 03-30-2005 , 20:00  
Reply With Quote #7

rcon sv_gravity is the same,or? which unneeded plugin -.-
The-56k-LaggA is offline
Send a message via ICQ to The-56k-LaggA
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 04-01-2005 , 13:17  
Reply With Quote #8

Yeah. :-\
Johnny got his gun is offline
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 01:52.


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