Raised This Month: $ Target: $400
 0% 

HELP - with /gravity for admins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 12-19-2011 , 12:25   Re: HELP - with /gravity for admins
Reply With Quote #1

Try this simple edit
PHP Code:
RegisterHamHam_Spawn"player""fwPlayerSpawn" 
Erox902 is offline
Old 12-19-2011, 14:55
Devil259
This message has been deleted by Devil259. Reason: See code below
Pexu
Junior Member
Join Date: Dec 2011
Old 12-19-2011 , 15:10   Re: HELP - with /gravity for admins
Reply With Quote #3

still not working ;( the gravity resets back to 800 in new round
Pexu is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 12-20-2011 , 08:04   Re: HELP - with /gravity for admins
Reply With Quote #4

Code:
#include <amxmodx> #include <fun> #include <hamsandwich> #define MAX_PLAYERS 32 #define ADMIN_LEVEL ADMIN_SLAY #define ADMIN_GRAV 250.0 new bool:g_bHasGrav[MAX_PLAYERS+1] new sv_gravity public plugin_init( ) {     sv_gravity = get_cvar_pointer( "sv_gravity" )     register_clcmd( "say /grav" , "cmdGrav" )     register_clcmd( "say /gravity" , "cmdGrav" )     RegisterHam( Ham_Spawn , "player" , "fwPlayerSpawn" , true ) } public fwPlayerSpawn( id ) {     if( is_user_alive( id ) && g_bHasGrav[ id ] )     {         set_task( 0.2 , "setGrav" , id )     } } public setGrav( id ) {     if( is_user_alive( id ) && g_bHasGrav[ id ] )     {         set_user_gravity( id , ADMIN_GRAV / get_pcvar_float( sv_gravity ) )     } } public client_putinserver( id ) {     g_bHasGrav[ id ] = false } public cmdGrav( id ) {     if( get_user_flags(id) & ADMIN_LEVEL )     {         if( !g_bHasGrav[id] )         {             new Float:flGravity = (ADMIN_GRAV/get_pcvar_float(sv_gravity))             set_user_gravity( id , flGravity )             client_print( id , print_chat , " * You Have Enabled Low Gravity" )                         g_bHasGrav[ id ] = true         }         else         {             set_user_gravity( id )             client_print( id , print_chat , " * You Have Disabled Low Gravity" )                         g_bHasGrav[ id ] = false         }     }     return PLUGIN_HANDLED }
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Pexu
Junior Member
Join Date: Dec 2011
Old 12-21-2011 , 05:19   Re: HELP - with /gravity for admins
Reply With Quote #5

it works THANKS !!!
Pexu 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 12:06.


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