AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] Speed UP Weapon Fire Rate F.E : P90 (https://forums.alliedmods.net/showthread.php?t=92251)

exec0d3 05-12-2009 11:29

[Help] Speed UP Weapon Fire Rate F.E : P90
 
Hello, I want to speed up weapon P90 fire rate, but I don't know how :(

Hunter-Digital 05-12-2009 12:29

Re: [Help] Speed UP Weapon Fire Rate F.E : P90
 
This should do the trick:
PHP Code:

RegisterHam(Ham_Weapon_PrimaryAttack"weapon_p90""fwHam_p90rof"1)
 
public 
fwHam_p90rof(entset_pdata_float(ent460.05

0.05 is the time between bullets and 46 is the primary offset, 47 is for secondary attack

xPaw 05-12-2009 12:32

Re: [Help] Speed UP Weapon Fire Rate F.E : P90
 
http://forums.alliedmods.net/showthread.php?p=597185

SnoW 05-12-2009 12:35

Re: [Help] Speed UP Weapon Fire Rate F.E : P90
 
Quote:

Originally Posted by Hunter-Digital (Post 826283)
This should do the trick:
PHP Code:

RegisterHam(Ham_Weapon_PrimaryAttack"weapon_p90""fwHam_p90rof"1)
 
public 
fwHam_p90rof(entset_pdata_float(ent460.05

0.05 is the time between bullets and 46 is the primary offset, 47 is for secondary attack

I believe you should set 48 (m_flTimeWeaponIdle) in some cases as well. I did some tests that way long time ago, and didn't get good results. It made weapons faster suchs as shotguns, but when I tried it with rifles like AK47, it only made them slower, even I tried to set 0.0001 second.

exec0d3 05-12-2009 12:48

Re: [Help] Speed UP Weapon Fire Rate F.E : P90
 
thanks all :)

joaquimandrade 05-12-2009 12:57

Re: [Help] Speed UP Weapon Fire Rate F.E : P90
 
Quote:

Originally Posted by Hunter-Digital (Post 826283)
This should do the trick:
PHP Code:

RegisterHam(Ham_Weapon_PrimaryAttack"weapon_p90""fwHam_p90rof"1)
 
public 
fwHam_p90rof(entset_pdata_float(ent460.05

0.05 is the time between bullets and 46 is the primary offset, 47 is for secondary attack

You shouldn't hook PrimaryAttack unless the offset value get reset after attacking.
Probably hook Ham_Item_Deploy or Ham_Item_AddToPlayer would be the best way.

Edit:

Or Ham_Spawn (of the weapon)

hleV 05-12-2009 13:30

Re: [Help] Speed UP Weapon Fire Rate F.E : P90
 
Shouldn't it be registered as pre and not post primary attack?

Hunter-Digital 05-12-2009 13:50

Re: [Help] Speed UP Weapon Fire Rate F.E : P90
 
Quote:

Originally Posted by joaquimandrade (Post 826306)
You shouldn't hook PrimaryAttack unless the offset value get reset after attacking.
Probably hook Ham_Item_Deploy or Ham_Item_AddToPlayer would be the best way.

Edit:

Or Ham_Spawn (of the weapon)

well, doesn't it ? I think offsets 46 and 47 sets the next attack delay... if I set it only once the next attacks will be normal, I tested this for offfset 47 in the "block attack2" topic, after I fired the weapon, the 47 offset will get reset

Quote:

Originally Posted by hleV (Post 826318)
Shouldn't it be registered as pre and not post primary attack?

why ? I am not modifying the attack, I am modifying the NEXT attack's delay, so I just need to check when he attacks so that the next attack can be set in N seconds

joaquimandrade 05-12-2009 13:54

Re: [Help] Speed UP Weapon Fire Rate F.E : P90
 
Quote:

Originally Posted by Hunter-Digital (Post 826326)
well, doesn't it ? I think offsets 46 and 47 sets the next attack delay... if I set it only once the next attacks will be normal, I tested this for offfset 47 in the "block attack2" topic, after I fired the weapon, the 47 offset will get reset

I'm not saying that you are wrong. I'm saying that if it doesn't get reset you shouldn't hook the Attack. If its, it is fine as you have it.

exec0d3 05-13-2009 05:50

Re: [Help] Speed UP Weapon Fire Rate F.E : P90
 
when I do this:
PHP Code:

RegisterHam(Ham_Weapon_PrimaryAttack"weapon_p90""fwHam_p90rof"1)
 
public 
fwHam_p90rof(entset_pdata_float(ent460.05

and when I fire, (Sorry I dont know English language good) It fires like this: buf,buf,pause,pause,pause,pause,pause,buf ...
(pause = 1 Sec)

and how can I fix this problem?


All times are GMT -4. The time now is 01:28.

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