Raised This Month: $32 Target: $400
 8% 

[L4D1 & L4D2] Laser that never sucks (useful upgrades)


Post New Thread Reply   
 
Thread Tools Display Modes
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 12-16-2019 , 21:27   Re: [L4D1] Laser that never sucks (useful upgrades)
Reply With Quote #21

Quote:
Originally Posted by Dragokas View Post
I mean, you are sure you never saw such problem using your method, or you suggest to modify some properties of weapon's entity when it become "broken" for some reason?
I don't really get why you ask this?
Quote:
This should solve it but would require you to make a plugin for it.
I made this method since l4d2 has not really got options for this unlike l4d1 and ported to l4d1 functions the same but have not tested l4d1 linux.

Should work without issues, just let me know how linux works.

Just besure to set back to default, i'v not got a clue where in the code this is set, could be before or after my hooks.
PHP Code:
sm_cvar survivor_upgrade_reload_shotgun_duration 0.7
sm_cvar survivor_upgrade_reload_duration 0.6 
When i mentioned
Quote:
make upgraded variant of weapons ect.
I meant using weapon handling api since the forwards pass the weapon type and the entity index, can make a list of stats for that weapon ect so they can be all unique.
Up to you to imagine.
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D

Last edited by Lux; 12-17-2019 at 01:53.
Lux is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-17-2019 , 10:16   Re: [L4D1] Laser that never sucks (useful upgrades)
Reply With Quote #22

Thanks for the method, but I am not going to. That bug happens really very rare. So, nothing to care about.
Maybe somebody else want create alternate plugin.
I even not sure, maybe that caused by 3rd party plugin installed on my server.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 12-17-2019 at 10:21.
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-18-2019 , 03:34   Re: [L4D1] Laser that never sucks (useful upgrades)
Reply With Quote #23

Looks like bug with reloading caused by ConVar Anomaly of sv_cheats.
New ConVar Anomaly Fixer should resolve that.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-18-2019 , 03:36   Re: [L4D1] Laser that never sucks (useful upgrades)
Reply With Quote #24

Updated.

Quote:
1.6.4 (18-Dec-2019)
- Added forward OnUpgradeChanged(int iClient, int iUpgrade). Upgrade values are identical to enum: use bitwise operators to check for upgrade, e.g.: iUpgrade & LASER_BIT

1.6.3 (16-Dec-2019)
- Some ConVars removed and splitted to a new one:

Always force specific update on spawn:

* l4d_force_spawn_silencer
* l4d_force_spawn_laser_sight
* l4d_force_spawn_night_vision
* l4d_force_spawn_fast_reload

Force update only when unique player joined the server first time:

* l4d_force_join_silencer
* l4d_force_join_laser_sight
* l4d_force_join_night_vision
* l4d_force_join_fast_reload

It is often new players asked me to see laser, in the same time they still should have ability
to disable it. Now, they can have desired behavior.

Please, remove your cfg/sourcemod/l4d_useful_upgrades.cfg file.

1.6.2 (10-Apr-2019)
- Fixed "Entity is invalid" in SaveCookie().
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Cahit_asd
New Member
Join Date: Apr 2020
Old 04-05-2020 , 08:21   Re: [L4D1] Laser that never sucks (useful upgrades)
Reply With Quote #25

thank you for the plugin , it works for me

but i have 2 request please :

1- can you change the commands to be like that !laser=!l , !silent=!s , !night=!n
i tried it but when i compile the sp and get the smx , it doesnt work

2- can you remove the sound heard when you turn the laser sight on ?

thank you again
Cahit_asd is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-05-2020 , 14:47   Re: [L4D1] Laser that never sucks (useful upgrades)
Reply With Quote #26

Quote:
Originally Posted by Cahit_asd View Post
1- can you change the commands to be like that !laser=!l , !silent=!s , !night=!n
No, I can't, because that may create conflict for somebody who using the same shortcuts for other task.

Quote:
Originally Posted by Cahit_asd View Post
i tried it but when i compile the sp and get the smx , it doesnt work
Then, perhaps you are doing something wrong.
I modified, compiled, and everything work.
PHP Code:
    RegConsoleCmd("sm_s"CmdSilencer"sm_silent - Toggle Silencer");
    
RegConsoleCmd("sm_l"CmdLaser"sm_laser - Toggle Laser Sight");
    
RegConsoleCmd("sm_n"CmdNightVision"sm_night - Toggle Night Vision"); 
You can also compile separate plugin to apply alias, like this:

PHP Code:
public void OnPluginStart()
{
    
RegConsoleCmd("sm_s"CmdSilencer"sm_silent - Toggle Silencer");
    
RegConsoleCmd("sm_l"CmdLaser"sm_laser - Toggle Laser Sight");
    
RegConsoleCmd("sm_n"CmdNightVision"sm_night - Toggle Night Vision");
}

public 
Action CmdSilencer(int clientint args)
{
    
FakeClientCommand(client"sm_silent");
    return 
Plugin_Handled;
}

public 
Action CmdLaser(int clientint args)
{
    
FakeClientCommand(client"sm_laser");
    return 
Plugin_Handled;
}

public 
Action CmdNightVision(int clientint args)
{
    
FakeClientCommand(client"sm_night");
    return 
Plugin_Handled;

or just use this plugin: [ANY] Command Aliases

Quote:
Originally Posted by Cahit_asd View Post
i
2- can you remove the sound heard when you turn the laser sight on ?
I'll see what I can do.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 05-03-2020 , 15:46   Re: [L4D1 & L4D2] Laser that never sucks (useful upgrades)
Reply With Quote #27

Updated.

Quote:
1.7 (05-May-2020)
- Prevented award sound from playing while you switch on the laser (memory patch method). Thanks for help to SilverShot and Krivous Anatolii (The Trick).
- Added GameData file.
- Updated Windows signatures.
- Added natives and helper functions (inc):
* UU_GetUpgrades
* UU_SetUpgrades
* UU_AddUpgrade
* UU_RemoveUpgrade
(usage sample is available in 1-st post under the spoiler).
- code simplifications.
- added basic L4D2 support (only laser and night vision).
// TODO:
- disable annoing instructor hints in L4d2.
- find a method to enable laser for any weapon in L4d2.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 05-03-2020 at 15:52.
Dragokas is offline
Cahit_asd
New Member
Join Date: Apr 2020
Old 05-10-2020 , 08:37   Re: [L4D1 & L4D2] Laser that never sucks (useful upgrades)
Reply With Quote #28

Thank you , it's perfect now
Cahit_asd is offline
Raikage
Junior Member
Join Date: Jun 2020
Old 06-15-2020 , 11:24   Re: [L4D1 & L4D2] Laser that never sucks (useful upgrades)
Reply With Quote #29

I added the commands below to my server.cfg file, but I don't see any change to the reload times for my other weapons. Do I have to create cfg files in the source mod folder to make this work? Sorry, this is my first time having a server.

- cfg/server.cfg (L4D1)

sm_cvar survivor_upgrade_reload_shotgun_duration "0.6" // default value - control shotgun reload speed if upgrade is enabled
sm_cvar survivor_upgrade_reload_duration "1" // default value - control other weapons reload animation speed if upgrade is enabled



Quote:
Originally Posted by Dragokas View Post
Updated.



// TODO:
- disable annoing instructor hints in L4d2.
- find a method to enable laser for any weapon in L4d2.
Raikage is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 06-15-2020 , 11:28   Re: [L4D1 & L4D2] Laser that never sucks (useful upgrades)
Reply With Quote #30

Do you have L4D1 ?
Did you enable perk with !reload ?
What is console output for:
Code:
sm_cvar survivor_upgrade_reload_shotgun_duration
sm_cvar survivor_upgrade_reload_duration
?
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Reply


Thread Tools
Display Modes

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:41.


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