Raised This Month: $ Target: $400
 0% 

fm_set_user_gravity Help!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-13-2009 , 03:48   Re: fm_set_user_gravity Help!
Reply With Quote #2

Try this.
Code:
#define USE_FAKEMETA // Comment this if you want to use Fun instead   #include <amxmodx> #include <amxmisc>   #if defined USE_FAKEMETA         #include <fakemeta> #else         #include <fun> #endif   #define MAX_PLAYERS 32   #define ADMIN_LEVEL ADMIN_SLAY #define ADMIN_GRAV 400   new g_bHasGrav[MAX_PLAYERS + 1]; new g_pGrav;   public plugin_init() {         g_pGrav = get_cvar_pointer("sv_gravity");           register_clcmd("say /grav", "cmdGrav", ADMIN_LEVEL);         register_clcmd("say /gravity", "cmdGrav", ADMIN_LEVEL); } public client_disconnect(iCl)         g_bHasGrav[iCl] = false;   public cmdGrav(iCl, iLvl, iCmd) {         if (!cmd_access(iCl, iLvl, iCmd, 2))                 return;           switch (g_bHasGrav[iCl])         {                 case 1:                 {                         g_bHasGrav[iCl] = false;   #if defined USE_FAKEMETA                         set_pev(iCl, pev_gravity, ADMIN_GRAV / get_pcvar_num(g_pGrav)); #else                         set_user_gravity(iCl, ADMIN_GRAV / get_pcvar_num(g_pGrav)); #endif                 }                 case 0:                 {                         g_bHasGrav[iCl] = true;   #if defined USE_FAKEMETA                         set_pev(iCl, pev_gravity, get_pcvar_num(g_pGrav)); #else                         set_user_gravity(iCl, get_pcvar_num(g_pGrav)); #endif                 }         } }
__________________
hleV is offline
 



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