Raised This Month: $12 Target: $400
 3% 

m_flNextPrimaryAttack


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ElijahDD
Junior Member
Join Date: Aug 2018
Old 08-28-2018 , 15:23   m_flNextPrimaryAttack
Reply With Quote #1

How to get perfect time of m_flNextPrimaryAttack?
ElijahDD is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-28-2018 , 15:31   Re: m_flNextPrimaryAttack
Reply With Quote #2

Explain perfect time.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
ElijahDD
Junior Member
Join Date: Aug 2018
Old 08-28-2018 , 15:46   Re: m_flNextPrimaryAttack
Reply With Quote #3

I need get perfect time for next attack, for example: I shooting with usp, there is some delay between shots > I need know how many milliseconds left before I can do next shoot..

Sorry for ban English.
ElijahDD is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-28-2018 , 17:18   Re: m_flNextPrimaryAttack
Reply With Quote #4

m_flNextPrimaryAttack - get_gametime().
__________________
HamletEagle is offline
ElijahDD
Junior Member
Join Date: Aug 2018
Old 08-28-2018 , 20:50   Re: m_flNextPrimaryAttack
Reply With Quote #5

Quote:
Originally Posted by HamletEagle View Post
m_flNextPrimaryAttack - get_gametime().
Code:
public Ham_Player_PreThink(id)
{
if(is_user_alive(id) && get_pdata_int(id, m_afButtonPressed, 5) & IN_ATTACK)
{
const m_pActiveItem = 373;
new iWeaponEnt = get_pdata_cbase(id , m_pActiveItem , 5);
new Float:Kek = get_pdata_float(iWeaponEnt, m_flNextPrimaryAttack, 4) - get_gametime();
client_print_color(id, print_team_default, "%.4f", Kek); 
}
}
Every shot:

Code:
-40.8839
-41.7503
-41.4020
-41.6604
-41.6403
-41.8189
-41.8288
-42.0479
...

Last edited by ElijahDD; 08-28-2018 at 20:51.
ElijahDD is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-28-2018 , 20:56   Re: m_flNextPrimaryAttack
Reply With Quote #6

What do you mean by everyshot

And why are you using player pre think fwd use primary attack forward instead

And explain what are you trying to achieve.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-29-2018 , 04:26   Re: m_flNextPrimaryAttack
Reply With Quote #7

Are you already modifying m_flNextPrimaryAttack somewhere else in your plugin?
__________________
klippy is offline
ElijahDD
Junior Member
Join Date: Aug 2018
Old 08-29-2018 , 11:41   Re: m_flNextPrimaryAttack
Reply With Quote #8

Quote:
Originally Posted by Natsheh View Post
What do you mean by everyshot

And why are you using player pre think fwd use primary attack forward instead

And explain what are you trying to achieve.
By everyshot i mean that i shot 8+ times and code that write HamletEagle give me results that i write in "code bb"
I need to catch people who shoot at perfect timings.
I'm not sure that it possible to do this in "Ham_Weapon_PrimaryAttack".
Sorry that I can't normally explain some moments, it's hard with my english

Quote:
Originally Posted by KliPPy View Post
Are you already modifying m_flNextPrimaryAttack somewhere else in your plugin?
No

Last edited by ElijahDD; 08-29-2018 at 11:49.
ElijahDD is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 08-29-2018 , 11:43   Re: m_flNextPrimaryAttack
Reply With Quote #9

You should hook weapon forward by RegisterHam with Ham_Item_PostFrame offset, then get m_flNextPrimaryAttack and at last check if it is less or equal to zero
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 08-29-2018 at 11:43.
Ghosted is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 08-31-2018 , 17:23   Re: m_flNextPrimaryAttack
Reply With Quote #10

Quote:
Originally Posted by HamletEagle View Post
m_flNextPrimaryAttack - get_gametime().
CS is compiled with client prediction, there's no dependency of gametime.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Old 08-31-2018, 17:33
HamletEagle
This message has been deleted by HamletEagle.
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:33.


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