Raised This Month: $ Target: $400
 0% 

Solved Gravity (set_user_gravity)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
llaj
Junior Member
Join Date: Jul 2016
Old 08-21-2021 , 20:21   Gravity (set_user_gravity)
Reply With Quote #1

Hello.
I found here this plugin but i have bit problem. Im also using "respawn forever" plugin and this gravity plugin isnt work good with it. When player is respawned, gravity is changed back to default. Can someone help me and fix it? I want it like when i change gravity by command, gravity will not change back to default after every respawn, but it will last until the end of the map. Thank you guys!

PHP Code:
#include <amxmodx>
#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");

public 
clcmd_g(id)
{
    if(
gravity[id]){
        
set_user_gravity(idNORMAL_GRAVITY);
        
gravity[id] = false;
    }

    else {
        
set_user_gravity(idLOW_GRAVITY);
        
gravity[id] = true;
    }


Last edited by llaj; 08-21-2021 at 22:00.
llaj 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 16:08.


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