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

[L4D/L4D2]WeaponHandling_API(22/04/2021 - 1.0.6)


Post New Thread Reply   
 
Thread Tools Display Modes
bald14
Member
Join Date: Aug 2021
Old 10-03-2021 , 23:50   Re: [L4D/L4D2]WeaponHandling_API(22/04/2021 - 1.0.6)
Reply With Quote #71

Looks like something went wrong. I can't download it
bald14 is offline
spaghettipastaman
Member
Join Date: May 2021
Old 12-25-2021 , 23:29   Re: [L4D/L4D2]WeaponHandling_API(22/04/2021 - 1.0.6)
Reply With Quote #72

Is there a tutorial or anything like that for this? Very confusing to configure.
spaghettipastaman is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-26-2021 , 00:18   Re: [L4D/L4D2]WeaponHandling_API(22/04/2021 - 1.0.6)
Reply With Quote #73

Quote:
Originally Posted by spaghettipastaman View Post
Is there a tutorial or anything like that for this? Very confusing to configure.
What kind of tutorial are you looking for? Installing? Using in a plugin?
__________________
Psyk0tik is offline
spaghettipastaman
Member
Join Date: May 2021
Old 12-26-2021 , 01:19   Re: [L4D/L4D2]WeaponHandling_API(22/04/2021 - 1.0.6)
Reply With Quote #74

Quote:
Originally Posted by Psyk0tik View Post
What kind of tutorial are you looking for? Installing? Using in a plugin?
Configuring weapons with this plugin.
spaghettipastaman is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-26-2021 , 09:10   Re: [L4D/L4D2]WeaponHandling_API(22/04/2021 - 1.0.6)
Reply With Quote #75

Quote:
Originally Posted by spaghettipastaman View Post
Configuring weapons with this plugin.
Well since the plugin only provides forwards at the moment, you can follow this example by the author. Every forward provided by the plugin is pretty much identical to each other in terms of functionality, so that example should be straightforward with all the information you need.
__________________
Psyk0tik is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 02-22-2022 , 03:07   Re: [L4D/L4D2]WeaponHandling_API(22/04/2021 - 1.0.6)
Reply With Quote #76

could this handling shotgun firing rate?
---
yes this work perfect i have more idea
__________________

Last edited by NoroHime; 02-25-2022 at 13:57.
NoroHime is offline
Foxy0606
Junior Member
Join Date: Feb 2022
Old 02-27-2022 , 10:00   Re: [L4D/L4D2]WeaponHandling_API(25/09/2020 - 1.0.4)
Reply With Quote #77

Quote:
Originally Posted by Lux View Post
You can add the forward you want and use a switch statement here.

PHP Code:
public void WH_OnReloadModifier(int clientint weaponL4D2WeaponType weapontypefloat &speedmodifier)
{
    
float fReloadSpeed GetReloadSpeedModifier(weapontype);
    if(
fReloadSpeed == -1.0)
        return;
    
    
speedmodifier speedmodifier fReloadSpeed;// multiply and modifiers already active (multiplicative)
    //speedmodifier = speedmodifier + fReloadSpeed;// additive example
}

float GetReloadSpeedModifier(L4D2WeaponType WeaponType)
{
    
//you can add more cases to change each gun you want.
    
switch(WeaponType
    {
        case 
L4D2WeaponType_AutoshotgunSpasL4D2WeaponType_PumpshotgunL4D2WeaponType_PumpshotgunChrome:
        {
            return 
1.2;//abit faster
        
}
        case 
L4D2WeaponType_Autoshotgun:
        {
            return 
10.0;//ultra fast
        
}
        default:
        {
            return 
2.0;//default will always go here if no case matches so every weapon that is not a type above is 2x reload speed.
        
}
    }
    
//will never reach here if you use default case if thats the case remove default if you don't want to change anything.
    
return -1.0;// none of these guns return -1

Besure to read the include as that has a full list of weapon types in the enum.
Enjoy
So... i have to edit these line in WeaponHandling.sp right???
Foxy0606 is offline
Foxy0606
Junior Member
Join Date: Feb 2022
Old 02-27-2022 , 11:39   Re: [L4D/L4D2]WeaponHandling_API(22/04/2021 - 1.0.6)
Reply With Quote #78

Quote:
Originally Posted by NoroHime View Post
could this handling shotgun firing rate?
---
yes this work perfect i have more idea
How do you use that source code @NoroHime, im really new to this .
Foxy0606 is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 02-27-2022 , 12:07   Re: [L4D/L4D2]WeaponHandling_API(22/04/2021 - 1.0.6)
Reply With Quote #79

Quote:
Originally Posted by Foxy0606 View Post
How do you use that source code @NoroHime, im really new to this .
you just declare "forward" and you will receive Modification event if you installed WeaponHandling, and change the &speedmodifier this is a reference variable,i recommended use speedmomdifier *= 1.5 etc
need sample? click my signnature "provider" you can see some WeaponHandling based plugin or main thread attachment also have sample plugin
---
totally, you need install WeaponHandling, and write new plugin and type "include <weaponhandling>" or declare "forward void WH_OnReloadModifier(...)" and coding in body "public void WH_OnMeleeSwing(...){...}" to make it work
__________________

Last edited by NoroHime; 02-27-2022 at 13:22.
NoroHime is offline
Foxy0606
Junior Member
Join Date: Feb 2022
Old 02-27-2022 , 23:48   Re: [L4D/L4D2]WeaponHandling_API(22/04/2021 - 1.0.6)
Reply With Quote #80

Quote:
Originally Posted by NoroHime View Post
you just declare "forward" and you will receive Modification event if you installed WeaponHandling, and change the &speedmodifier this is a reference variable,i recommended use speedmomdifier *= 1.5 etc
need sample? click my signnature "provider" you can see some WeaponHandling based plugin or main thread attachment also have sample plugin
---
totally, you need install WeaponHandling, and write new plugin and type "include <weaponhandling>" or declare "forward void WH_OnReloadModifier(...)" and coding in body "public void WH_OnMeleeSwing(...){...}" to make it work
Thanks for ur instruction.
So I have prepared a sourcode like these:

PHP Code:
#include <sourcemod>
#include <WeaponHandling>

forward void WH_OnDeployModifier(int clientint weaponL4D2WeaponType weapontypefloat &speedmodifier);
forward void WH_OnGetRateOfFire(int clientint weaponL4D2WeaponType weapontypefloat &speedmodifier);
forward void WH_OnReloadModifier(int clientint weaponL4D2WeaponType weapontypefloat &speedmodifier);


public 
void WH_OnGetRateOfFire(int clientint weaponL4D2WeaponType weapontypefloat &speedmodifier)
{
    switch (
weapontype)
    {
        case 
L4D2WeaponType_HuntingRiflespeedmodifier speedmodifier 2// 100% faster fire rate
        
case L4D2WeaponType_SniperMilitaryL4D2WeaponType_SniperAwpL4D2WeaponType_SniperScoutspeedmodifier speedmodifier 2// 100% faster fire rate
        
case L4D2WeaponType_PumpshotgunL4D2WeaponType_PumpshotgunChromespeedmodifier speedmodifier 2// 100% faster fire rate
        
case L4D2WeaponType_AutoshotgunL4D2WeaponType_AutoshotgunSpasspeedmodifier speedmodifier 2.5// 150% faster fire rate
        
case L4D2WeaponType_RifleL4D2WeaponType_RifleAk47L4D2WeaponType_RifleDesertL4D2WeaponType_RifleM60L4D2WeaponType_RifleSg552speedmodifier speedmodifier 1.25//25% faster fire rate
        
    
}
}

public 
void WH_OnReloadModifier(int clientint weaponL4D2WeaponType weapontypefloat &speedmodifier)
{
    switch (
weapontype)
    {
        case 
L4D2WeaponType_PumpshotgunL4D2WeaponType_PumpshotgunChromespeedmodifier speedmodifier 2// 100% faster reload
        
case L4D2WeaponType_AutoshotgunL4D2WeaponType_AutoshotgunSpasspeedmodifier speedmodifier 2.5// 150% faster reload
        
case L4D2WeaponType_HuntingRiflespeedmodifier speedmodifier 2// 100% faster reload
        
case L4D2WeaponType_SniperMilitaryL4D2WeaponType_SniperAwpL4D2WeaponType_SniperScoutspeedmodifier speedmodifier 2// 100% faster reload
        
case L4D2WeaponType_RifleL4D2WeaponType_RifleAk47L4D2WeaponType_RifleDesertL4D2WeaponType_RifleM60L4D2WeaponType_RifleSg552speedmodifier speedmodifier 2//100% faster reload
    
}
}

public 
void WH_OnDeployModifier(int clientint weaponL4D2WeaponType weapontypefloat &speedmodifier)
{
    switch (
weapontype)
    {
        case 
L4D2WeaponType_HuntingRiflespeedmodifier speedmodifier 2// 100% faster deploy time
        
case L4D2WeaponType_SniperMilitaryL4D2WeaponType_SniperAwpL4D2WeaponType_SniperScoutspeedmodifier speedmodifier 2// 100% faster deploy time
        
case L4D2WeaponType_PumpshotgunL4D2WeaponType_PumpshotgunChromespeedmodifier speedmodifier 2// 100% faster deploy time
        
case L4D2WeaponType_AutoshotgunL4D2WeaponType_AutoshotgunSpasspeedmodifier speedmodifier 2// 100% faster deploy time
        
case L4D2WeaponType_RifleL4D2WeaponType_RifleAk47L4D2WeaponType_RifleDesertL4D2WeaponType_RifleM60L4D2WeaponType_RifleSg552speedmodifier speedmodifier 2//100% faster deploy time
        
    
}

Then as u say, create a file has .sp extension and convert it to .smx right XD.
Foxy0606 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:16.


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