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

[L4D2] Keep Laser Sights (v1.2, 2012 Jan 7)


Post New Thread Reply   
 
Thread Tools Display Modes
Phoenix Rose
Junior Member
Join Date: Nov 2016
Old 11-18-2016 , 16:01   Re: [L4D2] Keep Laser Sights (v1.2, 2012 Jan 7)
Reply With Quote #21

this mod appears to be quite helpful to use, though i have encountered something that i don't think is possible to fix.

it appears that if you have high ping (anywhere from 200 to 300, at least that's what i get when i play with my friend who lives far away) then the laser sight doesn't transfer over to the new gun that you have picked up.

i don't know if there would be a way to fix this, other then the obvious "get better internet" but living in Canada and playing with someone from Russia, that's kinda hard. anyways, love the addon, just wanted to say one issue that has been on my mind
Phoenix Rose is offline
WhataMack
Junior Member
Join Date: Jul 2012
Old 02-27-2017 , 16:20   Re: [L4D2] Keep Laser Sights (v1.2, 2012 Jan 7)
Reply With Quote #22

One of the most useful mods available, and a feature that Valve, for some unknown bizarre reason, didn't include. Thank you for a great improvement!
WhataMack is offline
Smoak
Junior Member
Join Date: Dec 2019
Location: Maine
Old 09-26-2020 , 12:34   Re: [L4D2] Keep Laser Sights (v1.2, 2012 Jan 7)
Reply With Quote #23

This mod was basically screwed over by the last stand update, please update it if you can.
Smoak is offline
strikeraot
Senior Member
Join Date: Dec 2018
Location: Viet Nam
Old 09-29-2020 , 11:56   Re: [L4D2] Keep Laser Sights (v1.2, 2012 Jan 7)
Reply With Quote #24

Quote:
L 09/29/2020 - 22:55:22: [SM] Exception reported: Entity 757 (757) is invalid
L 09/29/2020 - 22:55:22: [SM] Blaming: l4d2_keeplasers.smx
L 09/29/2020 - 22:55:22: [SM] Call stack trace:
L 09/29/2020 - 22:55:22: [SM] [0] GetEntProp
L 09/29/2020 - 22:55:22: [SM] [1] Line 320, D:\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_ keeplasers.sp::L4D2_GetWeaponUpgrades
L 09/29/2020 - 22:55:22: [SM] [2] Line 186, D:\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_ keeplasers.sp::LaserDroppedDelay
L 09/29/2020 - 22:55:24: [SM] Exception reported: Entity 739 (739) is invalid
L 09/29/2020 - 22:55:24: [SM] Blaming: l4d2_keeplasers.smx
L 09/29/2020 - 22:55:24: [SM] Call stack trace:
L 09/29/2020 - 22:55:24: [SM] [0] GetEntProp
L 09/29/2020 - 22:55:24: [SM] [1] Line 320, D:\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_ keeplasers.sp::L4D2_GetWeaponUpgrades
L 09/29/2020 - 22:55:24: [SM] [2] Line 186, D:\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_ keeplasers.sp::LaserDroppedDelay
L 09/29/2020 - 22:55:25: [SM] Exception reported: Entity 757 (757) is invalid
L 09/29/2020 - 22:55:25: [SM] Blaming: l4d2_keeplasers.smx
L 09/29/2020 - 22:55:25: [SM] Call stack trace:
L 09/29/2020 - 22:55:25: [SM] [0] GetEntProp
L 09/29/2020 - 22:55:25: [SM] [1] Line 320, D:\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_ keeplasers.sp::L4D2_GetWeaponUpgrades
L 09/29/2020 - 22:55:25: [SM] [2] Line 186, D:\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_ keeplasers.sp::LaserDroppedDelay
Spamming my Console everytime i pick up a gun
strikeraot is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 09-29-2020 , 16:47   Re: [L4D2] Keep Laser Sights (v1.2, 2012 Jan 7)
Reply With Quote #25

- New syntax + methodmaps
- Error spam should be fixed
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_keeplasers.sp - 546 views - 13.0 KB)
__________________
Silvers is offline
BioHazardN7
Member
Join Date: Oct 2020
Location: Укр
Old 10-01-2020 , 02:18   Re: [L4D2] Keep Laser Sights (v1.2, 2012 Jan 7)
Reply With Quote #26

Quote:
Originally Posted by Silvers View Post
- New syntax + methodmaps
- Error spam should be fixed
Hello!
1. The laser sigh is not displayed on the latest game update.
2. Can you add laser sight to pistols?
3. Can you add the ability to disable the crosshair while the laser sight is active?

Last edited by BioHazardN7; 10-11-2020 at 02:38.
BioHazardN7 is offline
ETNKOREA
Junior Member
Join Date: Mar 2013
Old 10-21-2021 , 08:05   Re: [L4D2] Keep Laser Sights (v1.2, 2012 Jan 7)
Reply With Quote #27

Quote:
Originally Posted by Silvers View Post
- New syntax + methodmaps
- Error spam should be fixed
There is no Red Dot on M16 Rifle.
ETNKOREA is offline
glhf3000
Member
Join Date: Aug 2010
Location: middle-universe
Old 11-24-2021 , 19:15   Re: [L4D2] Keep Laser Sights (v1.2, 2012 Jan 7)
Reply With Quote #28

Quote:
Originally Posted by Silvers View Post
- New syntax + methodmaps
- Error spam should be fixed
there may be "weapon_" prefix if you pick it up off the fround or may be not if you pick it up from gun spawn.
fixed it in isLaserWeapon so sm_keeplasers_mode 2 works again.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_keeplasers.sp - 365 views - 14.2 KB)
glhf3000 is offline
dcx2
Senior Member
Join Date: Sep 2011
Old 04-11-2023 , 16:13   Re: [L4D2] Keep Laser Sights (v1.2, 2012 Jan 7)
Reply With Quote #29

Updated first post with In1ernal Error's fix

EDIT: How to change title of the thread? It only updated the title of the first post...
__________________

Last edited by dcx2; 04-11-2023 at 16:15.
dcx2 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-31-2023 , 15:47   Re: [L4D2] Keep Laser Sights (v1.4, 2023 April 11)
Reply With Quote #30

Quote:
Originally Posted by dcx2 View Post
When I find laser sights, I want to keep them, even if I switch guns. Why can't I just take the laser sight off one and put it onto the other gun?

So I wrote this plugin. When a player drops a weapon, it checks to see if there's a laser sight on it. If there is, it removes the laser sight from the dropped gun and adds it to whatever gun was picked up.

This only works if you already have laser sights. It won't give you laser sights if you don't already have them.

This is my first plugin so let me know if there's anything I can do to improve it. Thanks to Mr. Zero for l4dstocks.

EDIT:

2011-Dec-18 (version 1.1): fixed "gun spawn spam glitch". Also added cvar to remove hint. 71 views

EDIT2:

Still a bit nooby at this sourcemod stuff. I realized that this plugin does not require SDKHooks. It uses sdktools instead, so the web compiler works fine, therefore I removed the precompiled smx.

EDIT3:

2012-Jan-7 (version 1.2): Added a cvar for mode; Swap, Keep, or Always. See below.

PLANS:

1) Preserve other upgrades (fire ammo, explosive ammo)

CVARS:

sm_keeplasers_enable - default 1 - enables this plugin
sm_keeplasers_nohint - default 1 - disables hint on receiving laser sights
sm_keeplasers_mode - default 0 -
0 = Swap laser sights from dropped gun to current gun; if no current gun (e.g. player died), old gun keeps lasers.
1 = Keep laser sights once found, even if player dies and respawns
2 = Always give players laser sights, even if they were never found
sm_keeplasers_debug - default 0 - print debugging output to chat

UPGRADING:

If upgrading, backup any modifications made to [game]/cfg/sourcemod/L4D2_KeepLasers.cfg, then delete that file and restart your server. The file will be auto-created again with the new cvars. Modify as needed.

This is an unrealistic plugin, similar to swapping the ammo of your awp into your AK.

Different laser sight, might not even attach.

Guns are made in different countries and the last thing ever will be a universal code for gun stuff.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 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 00:37.


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