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

[HELP] Weapon Speed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 11-21-2015 , 14:22   [HELP] Weapon Speed
Reply With Quote #1

Can anyone explain to me how these works? how is that value measured in time?
Code:
set_pdata_float(iEnt, m_flNextSecondaryAttack, 0.0700, 4);
Depresie is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-22-2015 , 11:30   Re: [HELP] Weapon Speed
Reply With Quote #2

It sets when the secondary attack can occur again for that weapon. The time is in seconds.
__________________
Bugsy is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 11-22-2015 , 17:18   Re: [HELP] Weapon Speed
Reply With Quote #3

am i right if i say this is worse than callin prethink?
Depresie is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-22-2015 , 17:36   Re: [HELP] Weapon Speed
Reply With Quote #4

No, far from it. What makes you think this is so bad? Not many things are worse than prethink.
__________________
Bugsy is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 11-22-2015 , 18:08   Re: [HELP] Weapon Speed
Reply With Quote #5

called often
Depresie is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-22-2015 , 18:43   Re: [HELP] Weapon Speed
Reply With Quote #6

Quote:
Originally Posted by Depresie View Post
called often
Where are you calling this?
__________________
Bugsy is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 11-23-2015 , 13:06   Re: [HELP] Weapon Speed
Reply With Quote #7

Sorry, forgot to mention, ham primary attack
Depresie is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-23-2015 , 16:13   Re: [HELP] Weapon Speed
Reply With Quote #8

PrimaryAttack hook will keep firing if the attack1 button is pressed, even if the player is out of ammo.

Maybe try setting it with this instead? https://forums.alliedmods.net/showthread.php?t=54887
__________________
Bugsy is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 11-24-2015 , 09:10   Re: [HELP] Weapon Speed
Reply With Quote #9

I use this in my extra items:
Code:
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_name", "fw_PrimaryAttack_Post", 1);

Code:
public fw_PrimaryAttack_Post(weapon_entity) {     set_pdata_float(weapon_entity, 46, get_pcvar_float(your_cvar), 4); }
__________________









Last edited by CrazY.; 11-24-2015 at 09:11.
CrazY. is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-24-2015 , 11:25   Re: [HELP] Weapon Speed
Reply With Quote #10

CrazY, I never said it doesn't work, but if you put a client print in that callback you will see it spammed when you hold down primary attack button, even if no bullets are firing. It's my thought you would only want to set that when a bullet actually leaves the players gun.
__________________
Bugsy 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 21:28.


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