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

[L4D2] laser sight crosshair removal updated: 06/29


Post New Thread Reply   
 
Thread Tools Display Modes
ghosthunterfool
Senior Member
Join Date: Mar 2010
Old 07-04-2010 , 05:10   Re: [L4D2] laser sight crosshair removal updated: 06/29
Reply With Quote #41

when map changed in saferoom, the cross hair back
ghosthunterfool is offline
ionxp
BANNED
Join Date: Oct 2009
Old 07-26-2010 , 18:40   Re: [L4D2] laser sight crosshair removal updated: 06/29
Reply With Quote #42

after charger releases victim crosshair is back
ionxp is offline
Big Myke
Senior Member
Join Date: Jan 2009
Location: Grain Belt, USA
Old 11-18-2012 , 11:29   Re: [L4D2] laser sight crosshair removal updated: 06/29
Reply With Quote #43

I hate to bump an old thread like this but this plugin no longer works for me...
__________________
Successful Pluggins that I've Requested.
[L4D2]Blind Luck | [L4D2]Laser Sight Crosshair Removal
Big Myke is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 05-06-2016 , 12:12   Re: [L4D2] laser sight crosshair removal updated: 06/29
Reply With Quote #44

Yes, I finally got to fix this plugin. All I did was include l4d stocks and replace some buggy functions. Some of the codes are taken from Bot Weapon Preferences by DeathChaos25 and Keep Laser Sights by someone. (sorry I forgot the maker's name but at least I gave you credit)

Note: You need to have l4d_stocks.inc if you want to compile manually. If not, just download the .smx file. And you MUST have Auto Grab Laser Sights.

Quote:
Changelog: 05-07-16
- First release.
- Added the missing check for GetEntityNetClass error reported by Krufftys Killers.
- See above.

05-10-16
- Last post, people, for updates.

05-21-16
- Fixed the crosshairs disappearing when getting incapped by a special infected.
Attached Files
File Type: smx laser_sighted_weapons_fix-l4d2.smx (9.9 KB, 247 views)
File Type: sp Get Plugin or Get Source (laser_sighted_weapons_fix-l4d2.sp - 214 views - 10.4 KB)

Last edited by cravenge; 05-21-2016 at 09:47. Reason: New Final Version
cravenge is offline
Krufftys Killers
Senior Member
Join Date: Jan 2014
Old 05-06-2016 , 14:17   Re: [L4D2] laser sight crosshair removal updated: 06/29
Reply With Quote #45

Quote:
Originally Posted by cravenge View Post
Yes, I finally got to fix this plugin. All I did was include l4d stocks and replace some buggy functions. Some of the codes are taken from Bot Weapon Preferences by DeathChaos25 and Keep Laser Sights by someone. (sorry but at least, I gave you credit)

IMPROVEMENTS:
  1. Since the isWeaponPrimary boolean uses StrContains which for me is unreliable, I removed it and used entity checking instead to see if players are holding shotguns, machine guns, snipers (with the exception of AWP), or big guns.
  2. For the cookie, I used stocks such as L4D2_CanWeaponUpgrade and L4D2_GetWeaponUpgrade to cache it properly.
  3. Removed commands since they crash once it is executed with this fix.

TO DO:
  • Check if players are freed from SI to recover the crosshairs.
  • Fix random crosshair appearing and disappearing glitch.

Note: You need to have l4d_stocks.inc if you want to compile manually. If not, just download the .smx file. And you MUST have Auto Grab Laser Sights or Keep Laser Sights but don't use both as they conflict and produce invalid entity logs even though both have IsValidEntity(any variable) checks.
L 05/06/2016 - 14:02:16: SourceMod error session started
L 05/06/2016 - 14:02:16: Info (map "c1m1_hotel") (file "errors_20160506.log")
L 05/06/2016 - 14:02:16: [SM] Native "GetEntityNetClass" reported: Invalid entity (-1 - -1)
L 05/06/2016 - 14:02:16: [SM] Displaying call stack trace for plugin "laser_sighted_weapons_fix-l4d2.smx":
L 05/06/2016 - 14:02:16: [SM] [0] Line 108, laser_sighted_weapons_fix-l4d2.sp:oesPlayerHaveLaserWeapon()
L 05/06/2016 - 14:02:16: [SM] [1] Line 44, laser_sighted_weapons_fix-l4d2.sp::OnClientDisconnect()
L 05/06/2016 - 14:02:19: [SM] Native "GetEntityNetClass" reported: Invalid entity (-1 - -1)
L 05/06/2016 - 14:02:19: [SM] Displaying call stack trace for plugin "laser_sighted_weapons_fix-l4d2.smx":
L 05/06/2016 - 14:02:19: [SM] [0] Line 108, laser_sighted_weapons_fix-l4d2.sp:oesPlayerHaveLaserWeapon()
L 05/06/2016 - 14:02:19: [SM] [1] Line 44, laser_sighted_weapons_fix-l4d2.sp::OnClientDisconnect()
L 05/06/2016 - 14:03:02: [SM] Native "GetEntityNetClass" reported: Invalid entity (-1 - -1)
L 05/06/2016 - 14:03:02: [SM] Displaying call stack trace for plugin "laser_sighted_weapons_fix-l4d2.smx":
L 05/06/2016 - 14:03:02: [SM] [0] Line 108, laser_sighted_weapons_fix-l4d2.sp:oesPlayerHaveLaserWeapon()
L 05/06/2016 - 14:03:02: [SM] [1] Line 44, laser_sighted_weapons_fix-l4d2.sp::OnClientDisconnect()
L 05/06/2016 - 14:10:03: Error log file session closed.
Krufftys Killers is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 05-07-2016 , 08:33   Re: [L4D2] laser sight crosshair removal updated: 06/29
Reply With Quote #46

Hmm, for some reason, there are false error logs like Krufftys Killers reported even though in the code, there's already checks for that to return false.

By the way, reuploaded the plugin but I think the chances of getting this error is slim to moderate.
cravenge is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 05-10-2016 , 08:59   Re: [L4D2] laser sight crosshair removal updated: 06/29
Reply With Quote #47

Updated to 2.0:

==> Hooked the missing "player_afk" and "player_team" events to re-enable crosshairs if changed teams.
==> Hooked "player_incapacitated" and "player_ledge_release" events to fix the bug where crosshairs will disappear.
==> Hooked "revive_success" event to determine whether to re-enable or keep disabled the crosshairs if player is holding a primary weapon.
==> If punched by tank, crosshairs will either re-appear or keep disappeared while checking for primary weapons equipped.
==> Hooked "player_death" event to re-enable the crosshair of the player(s) who died.

Last edited by cravenge; 05-21-2016 at 05:02.
cravenge is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 05-21-2016 , 05:11   Re: [L4D2] laser sight crosshair removal updated: 06/29
Reply With Quote #48

My post updated. See for any changes.
cravenge is offline
Uncle Jessie
Member
Join Date: May 2016
Location: Mind Prison
Old 05-29-2016 , 18:01   Re: [L4D2] laser sight crosshair removal updated: 06/29
Reply With Quote #49

FCVAR_SERVER_CAN_EXECUTE prevented server running command: crosshair
Uncle Jessie is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 05-30-2016 , 02:31   Re: [L4D2] laser sight crosshair removal updated: 06/29
Reply With Quote #50

Quote:
Originally Posted by Uncle Jessie View Post
FCVAR_SERVER_CAN_EXECUTE prevented server running command: crosshair
I don't know what caused this problem but I think it has to do something with your settings or any changes you made. In the source code, you will find there's no FCVAR_SERVER_CAN_EXECUTE there.
cravenge 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 16:03.


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