Raised This Month: $ Target: $400
 0% 

About knife rate


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 05-24-2010 , 20:06   About knife rate
Reply With Quote #1

What is the exact rate of knife ?
I searched this : http://forums.alliedmods.net/showpos...2&postcount=12
but, when I test it with that code, it make the knife cutting too fast
so, could you tell me the exact rate of knife(include PrimaryAttackRate and SecondaryAttackRate) when the knife is normal(the rate of default).

Thanks
__________________
Quote:
Destinies in my AWP sight are all alike;
Destinies out of my AWP sight in its own way.
epic . is offline
Send a message via ICQ to epic .
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 05-24-2010 , 20:51   Re: About knife rate
Reply With Quote #2

do something like this in every attack:
Code:
client_print(id, print_chat, "attack was on = %f", halflife_time())
Do some knife attacks holding attack button. Take the last attack time and subtract from it the time that was on one attack older.


Not sure if its 100% proper, but i was using this. ^^
__________________
Voi is offline
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 05-24-2010 , 21:27   Re: About knife rate
Reply With Quote #3

Quote:
Originally Posted by Voi View Post
do something like this in every attack:
Code:
client_print(id, print_chat, "attack was on = %f", halflife_time())
Do some knife attacks holding attack button. Take the last attack time and subtract from it the time that was on one attack older.


Not sure if its 100% proper, but i was using this. ^^
I am not very convenient for testing now, could you give me the result ^ ^
__________________
Quote:
Destinies in my AWP sight are all alike;
Destinies out of my AWP sight in its own way.
epic . is offline
Send a message via ICQ to epic .
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-25-2010 , 05:19   Re: About knife rate
Reply With Quote #4

Check the source code of the knife.
__________________
Arkshine is offline
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 05-25-2010 , 05:36   Re: About knife rate
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
It is very useful !
but, what does the "tr.flFraction" mean ?
and, what is the number of UTIL_WeaponTimeBase ?

Thanks
__________________
Quote:
Destinies in my AWP sight are all alike;
Destinies out of my AWP sight in its own way.
epic . is offline
Send a message via ICQ to epic .
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-25-2010 , 05:39   Re: About knife rate
Reply With Quote #6

The same as TR_flFraction, the distance between 2 points, 0.0 to 1.0. 0.5 would mean the trace have traveled the half. UTIL_WeaponTimeBase is the same as get_gametime(), but since the weapons are client-side, it should be 0.
__________________
Arkshine is offline
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 05-25-2010 , 05:41   Re: About knife rate
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
The same as TR_flFraction, the distance between 2 points, 0.0 to 1.0. 0.5 would mean the trace have traveled the half. UTIL_WeaponTimeBase is the same as get_gametime(), but since the weapons are client-side, it should be 0.
You are wonderful !!
Thanks

So, if I change the "amx_knife_attack1_rate" and "amx_knife_attack2_rate" to "0.35" & "0.5" it will knife with default speed when no shield?
Code:
g_pCvarPrimaryAttackRate = register_cvar("amx_knife_attack1_rate", "0.15")
g_pCvarSecondaryAttackRate = register_cvar("amx_knife_attack2_rate", "0.30")
__________________
Quote:
Destinies in my AWP sight are all alike;
Destinies out of my AWP sight in its own way.

Last edited by epic .; 05-25-2010 at 05:47.
epic . is offline
Send a message via ICQ to epic .
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 05-25-2010 , 06:38   Re: About knife rate
Reply With Quote #8

How to change knife's max distance?
__________________
Voi is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-25-2010 , 06:58   Re: About knife rate
Reply With Quote #9

Either pathing the memory to change directly 32 or 48 ( look the source code ), either hooking traceline and tracehull and recalculate the end vector with the new distance but it won't work with FM_ nor Orpheu, or rewritting the whole code.

The most efficient way is obviously the first one.

@epic . : What do you want to do exactly?
__________________
Arkshine is offline
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 05-25-2010 , 07:42   Re: About knife rate
Reply With Quote #10

Quote:
Originally Posted by Arkshine View Post
Either pathing the memory to change directly 32 or 48 ( look the source code ), either hooking traceline and tracehull and recalculate the end vector with the new distance but it won't work with FM_ nor Orpheu, or rewritting the whole code.
Thanks I see it now. Since there aren't so many examples and Im a hard learner(in programming) I would need to request the code for it, cause I have no idea how to do this in orpheu - black magic for me.
__________________
Voi is offline
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 14:53.


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