Raised This Month: $ Target: $400
 0% 

Rate Of Fire


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
The Specialist
BANNED
Join Date: Nov 2006
Old 11-15-2006 , 01:07   Rate Of Fire
Reply With Quote #1

I need to know how to adjust a users rate of fire on all weapons. So i can either make them fire faster or slower then normal . thanks guys
The Specialist is offline
Send a message via AIM to The Specialist
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 11-15-2006 , 08:02   Re: Rate Of Fire
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=41265
__________________
schnitzelmaker is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-15-2006 , 15:56   Re: Rate Of Fire
Reply With Quote #3

yes. i know how to block fire since i have already done that. i need to make a persons gun fire faster then normal. that tutorial shows how to block using time until next attack . but time until next attack wont make a gun fire faster will it?
The Specialist is offline
Send a message via AIM to The Specialist
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 11-15-2006 , 16:41   Re: Rate Of Fire
Reply With Quote #4

its in there, just above the quick reference part

Quote:
Originally Posted by KCE View Post
Custom Weapon ROF (Rate-of-fire)
  • I did this part on-the-fly...anyways there are, of course, many ways to do this. This is just one way; there may be others methods that could be better suited for your situation; just take a look at the above snippet from the Spawn Chat protection plugin.
  • Also the subtraction of the 0.001 is not neccessary but feel free to do it if needed. I believe it is done because it is checked with greater than (>) so the delay is slightly longer but only by a very miniscule amount.
  • Create some variables to store some info:
    Code:
    new g_NextAttack[33];   //stores players' next attack times new g_BlockAnim[33];    //stores players' variable for whether to block animation in UpdateClientData_Post new CVAR_rof;           //"pointer" to CVAR containing the rof; could also be define

...
__________________
plop
p3tsin is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-15-2006 , 16:53   Re: Rate Of Fire
Reply With Quote #5

ive already read all of that. Im asking if time until next attack can be used to make a gun fire faster then normal . in that tutorial he shows how to block fireing for a certain amount of time using time until next attack.
Code:
set_cd(cd_handle, CD_flNextAttack, halflife_time() + 0.001 );

can i use this to make the guns fire faster ? like this

Code:
set_cd(cd_handle, CD_flNextAttack, halflife_time() - 0.001 );

will this work ? thanks guys ++karma

Last edited by The Specialist; 11-15-2006 at 16:56.
The Specialist is offline
Send a message via AIM to The Specialist
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 11-16-2006 , 04:14   Re: Rate Of Fire
Reply With Quote #6

NO
Code:
set_cd(cd_handle, CD_flNextAttack, halflife_time() + 0.001 );
0.001 is the rof,to have a rof of 1 second you must set set_cd(cd_handle, CD_flNextAttack, halflife_time() + 1.0 );
__________________

Last edited by schnitzelmaker; 11-16-2006 at 04:16.
schnitzelmaker is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-16-2006 , 04:28   Re: Rate Of Fire
Reply With Quote #7

so then i cant use that way to make it faster ? so then how would i go about making a gun faster ? lol
The Specialist is offline
Send a message via AIM to The Specialist
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 11-16-2006 , 05:58   Re: Rate Of Fire
Reply With Quote #8

I have test a lot,sry it dont work, i can only set animation faster but not rof.

m_flNextAttack is only for reload and block rof.

But i think there is a way,after clientdata is the weapondata,that store the
m_flNextPrimaryAttack,which is the time to next fire.

But i didnt find a function in amxx for use it.

from hlsdk:
Code:
typedef struct local_state_s
{
	entity_state_t playerstate;
	clientdata_t   client;
	weapon_data_t  weapondata[ 32 ];
} local_state_t;
__________________

Last edited by schnitzelmaker; 11-16-2006 at 10:52.
schnitzelmaker is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-16-2006 , 17:03   Re: Rate Of Fire
Reply With Quote #9

LOL. hmmm , maybee ill jsut slow all attacks by .001 then speed up the one i want back to normal. it seems almost impossable to speed up the rate of fire past animations. thanks for all the help though ++karma
The Specialist is offline
Send a message via AIM to The Specialist
VEN
Veteran Member
Join Date: Jan 2005
Old 11-17-2006 , 02:42   Re: Rate Of Fire
Reply With Quote #10

Have you looked into "Full Auto" plugin?
VEN 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 06:58.


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