Raised This Month: $ Target: $400
 0% 

Solved Gravity (set_user_gravity)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-21-2021 , 21:34   Re: Gravity (set_user_gravity)
Reply With Quote #2

Not tested
PHP Code:

#include <amxmodx>
#include <hamsandwich>
#include <fun>

#define NORMAL_GRAVITY 1.0
#define LOW_GRAVITY 0.5

new bool:gravity[33];

public 
plugin_init()
{
    
register_clcmd("say /gravity""clcmd_g");
    
RegisterHamHam_Spawn "player" "HamSpawn_Post" true );
}

public 
clcmd_gid )
{
    if(
gravity[id])
    {
        
set_user_gravity(idNORMAL_GRAVITY);
        
gravity[id] = false;
    }
    
    else 
    {
        
set_user_gravity(idLOW_GRAVITY);
        
gravity[id] = true;
    }


public 
HamSpawn_PostiPlayer )
{
    if ( 
gravity[iPlayer] && is_user_aliveiPlayer ) )
        
set_user_gravity(iPlayerLOW_GRAVITY);

__________________

Last edited by Bugsy; 08-22-2021 at 11:36.
Bugsy 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 02:31.


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