Raised This Month: $ Target: $400
 0% 

problem with setting gravity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Speed!
BANNED
Join Date: Jan 2009
Old 02-04-2009 , 18:11   problem with setting gravity
Reply With Quote #1

this does not work me

set_pev(id, pev_gravity, g_zclass_grav[g_zombieclass[id]] + gravityupgrade)

it gets stuck into the roof

if u wanna know, gravityupgrade = -180

already tried with positive numbers... dont work
if i remove the gravityupgrade it works
Speed! is offline
L//
Senior Member
Join Date: Aug 2008
Location: Not found
Old 02-04-2009 , 20:21   Re: problem with setting gravity
Reply With Quote #2

set_pev(id, pev_gravity, 1.0)

gravity = 800


Other ie:

new Float:gravity = 0.5
set_pev(id, pev_gravity, gravity)

gravity = 450
__________________
L// is offline
Send a message via MSN to L//
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 02-05-2009 , 08:34   Re: problem with setting gravity
Reply With Quote #3

Quote:
Originally Posted by L// View Post
set_pev(id, pev_gravity, 1.0)

gravity = 800


Other ie:

new Float:gravity = 0.5
set_pev(id, pev_gravity, gravity)

gravity = 450
First simple math:
900 * 0.5 = 450, but
800 * 0.5 = 400
Also your example only happens if sv_gravity is the default 800.
In pev_gravity, 3rd parameter is a factor for the sv_gravity cvar.
Example:
sv_gravity = 200
set_pev(player_index, pev_gravity, 0.5);
Player's gravity is 200 * 0.5 = 100

Last edited by SnoW; 02-05-2009 at 08:39.
SnoW is offline
Send a message via MSN to SnoW
Old 02-05-2009, 12:25
Speed!
This message has been deleted by Speed!.
Speed!
BANNED
Join Date: Jan 2009
Old 02-05-2009 , 12:35   Re: problem with setting gravity
Reply With Quote #5

but with yours examples it says tag mismatch :S
thanks for answering
Speed! is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 02-05-2009 , 14:39   Re: problem with setting gravity
Reply With Quote #6

Quote:
Originally Posted by Speed! View Post
but with yours examples it says tag mismatch :S
thanks for answering
I can't know what u did wrong(I can never be wrong), showing your code would be something.
SnoW is offline
Send a message via MSN to SnoW
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 02-05-2009 , 14:46   Re: problem with setting gravity
Reply With Quote #7

Quote:
Originally Posted by Speed! View Post
but with yours examples it says tag mismatch :S
thanks for answering
Check if you are Using Float.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Speed!
BANNED
Join Date: Jan 2009
Old 02-05-2009 , 15:15   Re: problem with setting gravity
Reply With Quote #8

Quote:
Originally Posted by AntiBots View Post
Check if you are Using Float.
yep, i just fixed it
my problem was this
i was using static float: gravityupgrade instead of static Float: gravityupgrade
fucking pawn case sensitive.. LOL
Speed! is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-06-2009 , 00:40   Re: problem with setting gravity
Reply With Quote #9

Quote:
Originally Posted by Speed! View Post
yep, i just fixed it
my problem was this
i was using static float: gravityupgrade instead of static Float: gravityupgrade
fucking pawn case sensitive.. LOL
This is because float is a native

Float: float ( value )
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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:40.


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