Raised This Month: $ Target: $400
 0% 

Rapid Fire


Post New Thread Reply   
 
Thread Tools Display Modes
Shouldercannon
BANNED
Join Date: Sep 2009
Location: Russia, Penza
Old 02-13-2011 , 12:31   Re: Rapid Fire
Reply With Quote #21

Quote:
Originally Posted by blodia View Post
atleast you used the search feature this time round, i see you using zeroibis's snippet.

if you only want to change fire rate and nothing else then use.

PHP Code:
... 
public 
OnClientPutInServer(client

    
SDKHook(clientSDKHook_PostThinkPostOnPostThinkPost); 

... 
public 
OnPostThinkPost(client

    new 
zomg GetPlayerWeaponSlot(clientCS_SLOT_PRIMARY); 

    if(
IsValidEntity(zomg)) 
    {
        
SetEntPropFloat(zomgProp_Send"m_flNextPrimaryAttack", (GetGameTime() + 0.05));
    } 

i've added comments to my weapon mod plugin ready for next release(whenever run speed it fixed) to it should be a bit easier to understand.
This method did not fit, since I use a flag (bool) to enable / disable rapid fire for current player.
Данный способ я использовал и он не подошёл, так как я использую флаг (bool) для включения/выключения скорострельности для определённого игрока.
Shouldercannon is offline
Send a message via ICQ to Shouldercannon
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 02-13-2011 , 12:43   Re: Rapid Fire
Reply With Quote #22

well it works fine in my weapon mod which i just checked to make sure it was still working.
blodia is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 02-13-2011 , 20:46   Re: Rapid Fire
Reply With Quote #23

You can just use : new bool:rapidfire[MAXPLAYERS+1] then check if client has value on each frame...
__________________
zeroibis is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 02-13-2011 , 20:48   Re: Rapid Fire
Reply With Quote #24

Also you may want to note statements made here: http://forums.alliedmods.net/showthread.php?t=147639

Quote:
From what I tested if I add <0.6 to m_flNextPrimaryAttack it will not prevent the full auto from working. However if I add <0.6 it will no longer register the shots? Any way to get full auto to work with increased fire rate?
__________________
zeroibis is offline
Shouldercannon
BANNED
Join Date: Sep 2009
Location: Russia, Penza
Old 02-14-2011 , 06:52   Re: Rapid Fire
Reply With Quote #25

Quote:
Originally Posted by blodia View Post
atleast you used the search feature this time round, i see you using zeroibis's snippet.

if you only want to change fire rate and nothing else then use.

PHP Code:
... 
public 
OnClientPutInServer(client

    
SDKHook(clientSDKHook_PostThinkPostOnPostThinkPost); 

... 
public 
OnPostThinkPost(client

    new 
zomg GetPlayerWeaponSlot(clientCS_SLOT_PRIMARY); 

    if(
IsValidEntity(zomg)) 
    {
        
SetEntPropFloat(zomgProp_Send"m_flNextPrimaryAttack", (GetGameTime() + 0.05));
    } 

i've added comments to my weapon mod plugin ready for next release(whenever run speed it fixed) to it should be a bit easier to understand.
Rate of fire is, but no damages.
Скорострельность есть, а повреждений нет.
Shouldercannon is offline
Send a message via ICQ to Shouldercannon
zeroibis
Veteran Member
Join Date: Jun 2007
Old 02-14-2011 , 15:53   Re: Rapid Fire
Reply With Quote #26

Quote:
Originally Posted by Shouldercannon View Post
Rate of fire is, but no damages.
Скорострельность есть, а повреждений нет.
Correct, as stated in post directly above...

Quote:
Originally Posted by zeroibis View Post
Also you may want to note statements made here: http://forums.alliedmods.net/showthread.php?t=147639

Quote:
From what I tested if I add <0.6 to m_flNextPrimaryAttack it will not prevent the full auto from working. However if I add <0.6 it will no longer register the shots? Any way to get full auto to work with increased fire rate?
__________________
zeroibis is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 02-14-2011 , 20:08   Re: Rapid Fire
Reply With Quote #27

i don't know what to tell you, it works fine in weapon mod.
blodia is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 02-14-2011 , 20:46   Re: Rapid Fire
Reply With Quote #28

Oh it does work as long as the value is .06 or >.06

Fixed valued
__________________

Last edited by zeroibis; 02-15-2011 at 20:58. Reason: Fixed values
zeroibis is offline
Shouldercannon
BANNED
Join Date: Sep 2009
Location: Russia, Penza
Old 02-15-2011 , 03:28   Re: Rapid Fire
Reply With Quote #29

This work if "m_flNextPrimaryAttack" = 0.01 else (> 0.01) no damage on fire.
PHP Code:
SetEntPropFloat(zomgProp_Send"m_flNextPrimaryAttack", (GetGameTime() + 0.01)); 
Shouldercannon is offline
Send a message via ICQ to Shouldercannon
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 02-15-2011 , 03:49   Re: Rapid Fire
Reply With Quote #30

why used GetGameTime() instead of GetEngineTime() ?
__________________

Last edited by Leonardo; 02-15-2011 at 03:51.
Leonardo 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 02:34.


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