Raised This Month: $ Target: $400
 0% 

[L4D2] Melee Weapon Swing Speed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
comp_noob
Senior Member
Join Date: Nov 2010
Old 11-20-2010 , 01:44   [L4D2] Melee Weapon Swing Speed
Reply With Quote #1

sorry for using an old thread to ask a new question, i do not want to create too many threads.... just wanna ask, is there any net props that can allow one to set the swing speed of the melee weapon that one is using? i'm looking at m_flNextAttack, m_flNextPrimaryAttack & m_flNextSecondaryAttack.. i'm not too sure how to set these net props.... so if anyone knows how, can you teach me? thanks in advance

Last edited by comp_noob; 11-24-2010 at 05:12.
comp_noob is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 11-20-2010 , 07:32   Re: [L4D2] Block Item Pickup
Reply With Quote #2

Store the condition in a bool:flag.
__________________
FaTony is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 11-20-2010 , 07:34   Re: [L4D2] Block Item Pickup
Reply With Quote #3

Hook 'give' and disable the next item from being blocked
AtomicStryker is offline
comp_noob
Senior Member
Join Date: Nov 2010
Old 11-21-2010 , 09:26   Re: [L4D2] Block Item Pickup
Reply With Quote #4

Quote:
Originally Posted by AtomicStryker View Post
Hook 'give' and disable the next item from being blocked
i know about how to hook 'give', but about disabling only the next item from being blocked, i don't exactly know how to do it... do you mind giving me an example? thank you very much...
comp_noob is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 11-21-2010 , 11:04   Re: [L4D2] Block Item Pickup
Reply With Quote #5

PHP Code:
static bool:allowNextItem false;

[...]

public 
GiveHook(..)
{
allowNextItem true;
}

public 
CanWeaponUseHook(...)
{
if (
allowNextItem)
{
 
allowNextItem false;
 return 
Plugin_Continue;
}

AtomicStryker is offline
comp_noob
Senior Member
Join Date: Nov 2010
Old 11-22-2010 , 02:09   Re: [L4D2] Block Item Pickup
Reply With Quote #6

Quote:
Originally Posted by AtomicStryker View Post
PHP Code:
static bool:allowNextItem false;

[...]

public 
GiveHook(..)
{
allowNextItem true;
}

public 
CanWeaponUseHook(...)
{
if (
allowNextItem)
{
 
allowNextItem false;
 return 
Plugin_Continue;
}

hi, would like to ask, do i need to array the boolean? i'm afraid that the plugin will mess up if give command was executed by two clients at the same time...
comp_noob is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 11-22-2010 , 06:21   Re: [L4D2] Block Item Pickup
Reply With Quote #7

No. You have to understand this happens from one frame to another - give immediatly after spawns the weapon, which triggers WeaponCanUse. Since the engine is not threaded it's impossible for multiple people to use 'give' at once.
AtomicStryker is offline
comp_noob
Senior Member
Join Date: Nov 2010
Old 11-22-2010 , 11:38   Re: [L4D2] Block Item Pickup
Reply With Quote #8

please reply if you know how to solve the question in the first post~ thanks!

Last edited by comp_noob; 11-24-2010 at 05:13.
comp_noob is offline
comp_noob
Senior Member
Join Date: Nov 2010
Old 11-25-2010 , 00:02   Re: [L4D2] Melee Weapon Swing Speed
Reply With Quote #9

sorry for bumping this topic, can anyone answer my question on the first post? thanks....
comp_noob is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 11-25-2010 , 05:37   Re: [L4D2] Melee Weapon Swing Speed
Reply With Quote #10

Check tponcho's Perkmod, its the only plugin i remember that might have been doing that.

I once tried something like this myself and it bugged out in a majorly fashion, so..
AtomicStryker 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 18:48.


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