Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Plugin ID:
6434
Plugin Version:
1.7.8
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    20 
    Plugin Description:
    Laser that doesn't crash the server + reload + silent + night
    Old 12-16-2019 , 01:34   Re: [L4D1] Laser that never sucks (useful upgrades)
    Reply With Quote #1

    hmm, that sdk method of activating laser is still sucks sometimes.
    On one of my server if last player exits, server freeze, and after join again, calling sdk is not work, dunno why. No error in logs. Plugin reload helps to resolve issue. Strange. Sdkcall is surely called, because I see msg "Laser on / off" in chat - next line of code.

    Reloading sdk sig is not helped.
    No problems with sm_cvar sb_all_bot_team 1

    Still, I never faced such behaviour on my production server.

    Any ideas why that happen?
    __________________
    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-17-2019 , 10:16   Re: [L4D1] Laser that never sucks (useful upgrades)
    Reply With Quote #2

    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 #3

    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 #4

    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 #5

    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 #6

    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 #7

    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 #8

    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 #9

    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 #10

    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



    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 06:29.


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