Raised This Month: $ Target: $400
 0% 

Ham_Player_Jump


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ColdWar
Member
Join Date: Aug 2012
Old 10-11-2012 , 14:38   Ham_Player_Jump
Reply With Quote #1

Hello, I'm using the HAMSANDWICH include for checking the number of jumps a player do.
I use that registerham -
PHP Code:
RegisterHam(Ham_Player_Jump"player""Fwd_JumpCount"1
and this is my "Fwd_JumpCount" public -
PHP Code:
public Fwd_JumpCount client )
{
    
g_jumps[client]++
    
Check_Ach(client)

Every time I jump, it adds 7 to the variable j_jumps[ client ].
Help please
Btw, this is my variable -
PHP Code:
new g_jumps[33]; 

Last edited by ColdWar; 10-11-2012 at 14:41.
ColdWar is offline
Guest
BANNED
Join Date: Oct 2012
Old 10-11-2012 , 14:43   Re: Ham_Player_Jump
Reply With Quote #2

Maybe because ur using mwheel up / down to jump instead of space.
Guest is offline
ColdWar
Member
Join Date: Aug 2012
Old 10-11-2012 , 14:46   Re: Ham_Player_Jump
Reply With Quote #3

Yeah i know but it doesn't metter i guess.. it should not count by +jump or -jump commands..
ColdWar is offline
Guest
BANNED
Join Date: Oct 2012
Old 10-11-2012 , 15:01   Re: Ham_Player_Jump
Reply With Quote #4

It only check the function when +jump function is called and while doing that with mwheel up its called for several times.
Guest is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 10-11-2012 , 16:19   Re: Ham_Player_Jump
Reply With Quote #5

check if player is on ground before increacing that variable
jimaway is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-12-2012 , 00:30   Re: Ham_Player_Jump
Reply With Quote #6

If you hold +jump during 1 second, the function gonna be called like 100 times (consider that it is continuously called), this is not reliable to count jumps.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 10-12-2012 at 00:30.
ConnorMcLeod is offline
xDrugz
Senior Member
Join Date: Jul 2011
Location: return 4;
Old 10-12-2012 , 06:37   Re: Ham_Player_Jump
Reply With Quote #7

Hook player keys and detect when he press space key.
Then increase your variable by 1 every time he uses space key.
xDrugz is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-12-2012 , 07:13   Re: Ham_Player_Jump
Reply With Quote #8

Quote:
Originally Posted by xDrugz View Post
Hook player keys and detect when he press space key.
Then increase your variable by 1 every time he uses space key.
Not possible without slowhacking, and we do not support slowhacking
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 10-12-2012 , 12:24   Re: Ham_Player_Jump
Reply With Quote #9

Quote:
Originally Posted by xDrugz View Post
Hook player keys and detect when he press space key.
Then increase your variable by 1 every time he uses space key.
Better way
PHP Code:
#define IN_JUMP                         (1<<1) 
then check if velocity[2] is more than 1.0 and less than -1.0, this will means that player is in air.
.Dare Devil. is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 10-12-2012 , 21:09   Re: Ham_Player_Jump
Reply With Quote #10

I check for jumping in my Shove Mod ;)

Last edited by Styles; 10-12-2012 at 21:09.
Styles is offline
Send a message via AIM to Styles
Reply



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 11:46.


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