Raised This Month: $ Target: $400
 0% 

set_pev,pev_gravity.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-09-2009 , 10:52   set_pev,pev_gravity.
Reply With Quote #1

What a hell???????
Gravity is like 9999999.
Whats the problem 0_o

PHP Code:
new sith_gravity
// in plugin init
sith_gravity register_cvar("sw_sith_gv""0.5")

// in player spawn
set_pev(idpev_gravityget_pcvar_float(sith_gravity)) 
xbatista is offline
Send a message via Skype™ to xbatista
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-09-2009 , 11:10   Re: set_pev,pev_gravity.
Reply With Quote #2

ur kidding?
Just other way of cvar.
PHP Code:
new gCvar_gravity;

gCvar_gravity register_cvar"sw_sith_gv""400" );

set_pevidpev_gravityget_pcvar_floatgCvar_gravity ) / 800.0 ); 
__________________

Last edited by xPaw; 05-09-2009 at 13:15.
xPaw is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-09-2009 , 11:12   Re: set_pev,pev_gravity.
Reply With Quote #3

Quote:
ur kidding?
What do you mean? :0

EDIT: I set to whatever gravity example "200" , it won't set to 200 its default 800, in your code :0
It should be :
PHP Code:
set_pevidpev_gravityfloatget_pcvar_numgCvar_gravity ) ) / 800 ); 
And when this, then gravity is max ~600 :0 I don't know what is wrong :/

P.S. I set gCvar_gravity to 200 and I'm not kidding :{

Last edited by xbatista; 05-09-2009 at 11:21.
xbatista is offline
Send a message via Skype™ to xbatista
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-09-2009 , 11:56   Re: set_pev,pev_gravity.
Reply With Quote #4

What a hell when I try without pcvar num and other methods :
PHP Code:
set_pev(idpev_gravity0.1
Than it normally works :/
xbatista is offline
Send a message via Skype™ to xbatista
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-09-2009 , 12:28   Re: set_pev,pev_gravity.
Reply With Quote #5

use set_user_gravity() then

edit: they must be float ! :} and sry about the "normal values" thing, I confused it with set_user_speed :">
__________________

Last edited by Hunter-Digital; 05-09-2009 at 13:46.
Hunter-Digital is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-09-2009 , 12:56   Re: set_pev,pev_gravity.
Reply With Quote #6

I've tryied also set_user_gravity, the same thing, maybe there are limit? 0_0
I know AMXX funcs writes minimum is 0.1 - 1

EDIT: EXOLENT I also tryied, the same, limit is ~400,if set lower, then gravity is the same ~400.

Now I've tryied :
PHP Code:
#define SITH_GRAVITY 200.0
// in spawn 
set_pev(idpev_gravitySITH_GRAVITY 800
And that works perfectly 0_o why?

Last edited by xbatista; 05-09-2009 at 13:00.
xbatista is offline
Send a message via Skype™ to xbatista
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-09-2009 , 12:56   Re: set_pev,pev_gravity.
Reply With Quote #7

Quote:
Originally Posted by xPaw View Post
PHP Code:
floatget_pcvar_numgCvar_gravity ) / 800 
Just do:
PHP Code:
get_pcvar_floatgCvar_gravity ) / 800.0 
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 01:36.


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