Raised This Month: $ Target: $400
 0% 

HIGH JUMP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ish12321
Veteran Member
Join Date: May 2016
Old 02-07-2017 , 07:34   HIGH JUMP
Reply With Quote #1

How to properly set player's gravity to different
I want to use it in my adrenaline plugin
provide player high gravity until his adrenaline drains
then revert back his gravity

please an example to help?
__________________
['O|s|G'] | Death Wins a.k.a Ish Chhabra was here
ish12321 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-07-2017 , 07:38   Re: HIGH JUMP
Reply With Quote #2

set_user_gravity???
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
ish12321
Veteran Member
Join Date: May 2016
Old 02-07-2017 , 07:45   Re: HIGH JUMP
Reply With Quote #3

I mean if the gravity reset on weapon change ?
__________________
['O|s|G'] | Death Wins a.k.a Ish Chhabra was here
ish12321 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-07-2017 , 07:51   Re: HIGH JUMP
Reply With Quote #4

You obviously didn't even try before you asked. Test it yourself.
klippy is offline
ish12321
Veteran Member
Join Date: May 2016
Old 02-07-2017 , 08:21   Re: HIGH JUMP
Reply With Quote #5

Please someone tell ...........>.<
__________________
['O|s|G'] | Death Wins a.k.a Ish Chhabra was here
ish12321 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-07-2017 , 08:31   Re: HIGH JUMP
Reply With Quote #6

This is the SCRIPTING section, so either try yourself and ask question a when you give us the code you tried, or don't ask at all.
__________________

Last edited by OciXCrom; 02-07-2017 at 08:31.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-07-2017 , 09:12   Re: HIGH JUMP
Reply With Quote #7

Quote:
Originally Posted by ish12321 View Post
Please someone tell ...........>.<
You won't learn anything if you are lazy. Test your plugin and see, for God sake.
__________________
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-07-2017 , 10:01   Re: HIGH JUMP
Reply With Quote #8

Gravity doesn't change on Weapon Switch.
PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>

#define PLUGIN "Gravity"
#define VERSION "1.0"
#define AUTHOR "DoNii"

#define GRAVITY 0.8

new bool:g_HasGravity[33];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /unsetgravity""set_player_gravity_default")
    
    
RegisterHam(Ham_Spawn"player""fw_HamSpawnPost"1)
}

public 
fw_HamSpawnPost(id) {
    
    if(!
g_HasGravity[id]) {
        
        
entity_set_float(idEV_FL_gravityGRAVITY)
        
g_HasGravity[id] = 1
    
}
}

public 
set_player_gravity_default(id) {
    
    
entity_set_float(idEV_FL_gravity1.0)
    
g_HasGravity[id] = 0

__________________

Last edited by edon1337; 02-07-2017 at 12:29.
edon1337 is offline
ish12321
Veteran Member
Join Date: May 2016
Old 02-07-2017 , 10:36   Re: HIGH JUMP
Reply With Quote #9

thanks for your help
But not being rude but as friends I'll like to suggest use bool for g_HasGravity
__________________
['O|s|G'] | Death Wins a.k.a Ish Chhabra was here
ish12321 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-07-2017 , 12:29   Re: HIGH JUMP
Reply With Quote #10

It was actually meant to be a bool, idk how I forgot that, anyways doing it the way it was is ok too.
__________________
edon1337 is offline
Reply


Thread Tools
Display Modes

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 21:01.


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