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

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


Post New Thread Reply   
 
Thread Tools Display Modes
gowness
Junior Member
Join Date: Nov 2009
Old 12-06-2009 , 01:17   Re: [L4D2] laser sight crosshair removal
Reply With Quote #11

Quote:
Originally Posted by thejuice027 View Post
I am using this plugin to spawn the laser sight
ok, well i'm not sure of a way to detect that because he uses FakeClientCommand to give the laser.

as for the deagle, i must have forgoten it in the weapon check. ill try to fix that within a day or two

EDIT: i just checked, the deagle works perfectly fine, if you are giving the laser to yourself and you have the deagle out, it will still remove the crosshair, but you should just have to switch weapons once to get it to reset.

Last edited by gowness; 12-06-2009 at 19:35.
gowness is offline
thejuice027
Senior Member
Join Date: Dec 2009
Old 12-07-2009 , 00:04   Re: [L4D2] laser sight crosshair removal
Reply With Quote #12

Ok, I just tested it myself and everything is fine. I was taking word from a friend who obvously didn't get what this plugin was supposed to do even though I told him 3 times.
thejuice027 is offline
gowness
Junior Member
Join Date: Nov 2009
Old 12-07-2009 , 07:52   Re: [L4D2] laser sight crosshair removal
Reply With Quote #13

Quote:
Originally Posted by DieTeetasse View Post
With the command "GetPlayerWeaponSlot(client, 1);" we can log the entitynumber of the weapon and save it into an array. If then the user picks up a weapon, the event "weapon_pickup" will be fired, that contains the entitynumber so we can compare them.
I went to implement this and 2 problems came up. firstly, weapon_pickup still did not trigger. but thats easy to get around. the larger problem is that the entityid of the weapon that the player is holding is (atleast per-clientid) constant. no matter if i picked up a gun off of a spawn point, gave one to myself, ent_create'd one, or anything, the value being returned by GetPlaterWeaponSlot(client,1) was always the same.
gowness is offline
Daewa
Member
Join Date: Oct 2009
Old 12-07-2009 , 18:45   Re: [L4D2] laser sight crosshair removal
Reply With Quote #14

Working good, but crosshair comes back after proceeding to next chapter for me.
Daewa is offline
gowness
Junior Member
Join Date: Nov 2009
Old 12-08-2009 , 02:09   Re: [L4D2] laser sight crosshair removal
Reply With Quote #15

Quote:
Originally Posted by Daewa View Post
Working good, but crosshair comes back after proceeding to next chapter for me.
added to the todo.not sure what to do with it either =/
gowness is offline
DieTeetasse
Senior Member
Join Date: Jul 2009
Old 12-08-2009 , 05:39   Re: [L4D2] laser sight crosshair removal
Reply With Quote #16

Maybe weaponslot 1 are the pistols and the primary weapon is in 0
2 is definitly the "grenade"-weaponslot for pipes and molos.
DieTeetasse is offline
gowness
Junior Member
Join Date: Nov 2009
Old 12-08-2009 , 19:16   Re: [L4D2] laser sight crosshair removal
Reply With Quote #17

Quote:
Originally Posted by DieTeetasse View Post
Maybe weaponslot 1 are the pistols and the primary weapon is in 0
2 is definitly the "grenade"-weaponslot for pipes and molos.
oh... ok well, that fixes the problem of getting the weapon id, now the problem is picking up a dropped weapon triggers neither item_pickup or weapon_pickup, so even with the current version, if you picked up a dropped weapon that doesn't have a laser, it wont re-set your crosshair untill you find a weapon spawn. i might just throw a check code in the weaponswitch function, since it gets called ( 3 times actually for some reason, once to pistols, then twice to the primary weapon) and compare it to the weapon that you had before.
gowness is offline
gowness
Junior Member
Join Date: Nov 2009
Old 12-09-2009 , 14:09   UPDATED to version 1.1.0
Reply With Quote #18

sorry about the double post, but i just updated to 1.1.0, fixing a few large crash bugs, and more importantly, weaponid based detection. leaving me with just the problem of transferring data between levels, since players spawn with duplicated weapons.
gowness is offline
Daewa
Member
Join Date: Oct 2009
Old 12-11-2009 , 11:27   Re: [L4D2] laser sight crosshair removal updated:12/09 v.2
Reply With Quote #19

1.1.5 is unstable.
Sometimes, this prevent the player to change weapon. I don't know how to reproduce the bug.

Code:
L 12/11/2009 - 17:26:43: [SM]   [0]  Line 240, l4d2_laser_crosshair_removal-1.1.5.sp::DoesPlayerNeedLaser()
L 12/11/2009 - 17:26:43: [SM]   [1]  Line 130, l4d2_laser_crosshair_removal-1.1.5.sp::OnWeaponSwitch()
L 12/11/2009 - 17:26:43: [SM] Plugin encountered error 15: Array index is out of bounds
L 12/11/2009 - 17:26:43: [SM] Displaying call stack trace for plugin "

Last edited by Daewa; 12-11-2009 at 13:36.
Daewa is offline
thejuice027
Senior Member
Join Date: Dec 2009
Old 12-12-2009 , 00:43   Re: [L4D2] laser sight crosshair removal updated:12/09 v.2
Reply With Quote #20

Was playing Dead Center 3, unable to change weapons, Thanks now I know what causes this. I was just about to report another bug though.

When a charger hits you with a ram, and you get free from his gasp with the help of another survivor, the crosshairs return.
thejuice027 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 12:59.


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