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

[L4D/2] CarAlarmCulprit


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Plugin ID:
3877
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Finds out who and how the car alarm has been set off.
    Unapprover:
    Reason for Unapproving:
    No plugin...
    Old 09-04-2013 , 05:14   [L4D/2] CarAlarmCulprit
    Reply With Quote #1



    Yesterday someone has contacted me through the steamforums and asked me how to do this. We both found out that this is surprisingly not as easy as simply reading out a variable, but I have come up with a solution which I would like to share.
    This prints a simple notification to anyone when a car alarm has been set off. It contains who did it and whether it has been set off by either touch or shooting at it.

    Changes 1.1:
    -Added game sanity check at the beginning

    EDIT:
    For some reason there seems to be an issue regarding the liability of this prediction. I have removed this plugin until further notice.

    Last edited by Dr. Greg House; 09-04-2013 at 11:16.
    Dr. Greg House is offline
    eric0279
    AlliedModders Donor
    Join Date: May 2007
    Old 09-05-2013 , 08:52   Re: [L4D/2] CarAlarmCulprit
    Reply With Quote #2

    It indicates that the car was hit while the alarm was not triggered (Weapon: Molotov)
    eric0279 is offline
    Marcus101RR
    Veteran Member
    Join Date: Aug 2009
    Location: Tampa, FL
    Old 09-05-2013 , 12:31   Re: [L4D/2] CarAlarmCulprit
    Reply With Quote #3

    The Event "explain_disturbance" kinda solves that easily, which is the director's Hint method but works only on enabled. Best thing to do is hook the entity "prop_car_alarm".
    __________________

    Last edited by Marcus101RR; 09-05-2013 at 12:56.
    Marcus101RR is offline
    Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
    Dr. Greg House
    Professional Troll,
    Part-Time Asshole
    Join Date: Jun 2010
    Old 09-05-2013 , 13:47   Re: [L4D/2] CarAlarmCulprit
    Reply With Quote #4

    Which is what I have been doing. The first issue was that "OnCarAlarmStart" both activator and caller are the entity id of the car. That is not a real issue at all because you can circumvent this with takedamage etc.. The real issue is that it seems to be impossible to determine whether that alarm car is really activated or not, at least from within a plugin. This is why I have removed the plugin for now.

    Quote:
    Originally Posted by Marcus101RR View Post
    The Event "explain_disturbance" kinda solves that easily, which is the director's Hint method but works only on enabled.[...]
    Which is also exactly why it is not an option.
    __________________
    Santa or Satan?

    Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

    Last edited by Dr. Greg House; 09-05-2013 at 13:48.
    Dr. Greg House is offline
    Marcus101RR
    Veteran Member
    Join Date: Aug 2009
    Location: Tampa, FL
    Old 09-05-2013 , 23:19   Re: [L4D/2] CarAlarmCulprit
    Reply With Quote #5

    Quote:
    Originally Posted by Dr. Greg House View Post
    Which is what I have been doing. The first issue was that "OnCarAlarmStart" both activator and caller are the entity id of the car. That is not a real issue at all because you can circumvent this with takedamage etc.. The real issue is that it seems to be impossible to determine whether that alarm car is really activated or not, at least from within a plugin. This is why I have removed the plugin for now.



    Which is also exactly why it is not an option.
    Removing it may not be a wise idea, as one, we could help and test it along side, and two, it may get unapproved.
    __________________
    Marcus101RR is offline
    Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
    lightpro
    Junior Member
    Join Date: Jun 2013
    Old 09-07-2013 , 21:56   Re: [L4D/2] CarAlarmCulprit
    Reply With Quote #6

    What this plugin can do. I don't understand
    lightpro is offline
    Marcus101RR
    Veteran Member
    Join Date: Aug 2009
    Location: Tampa, FL
    Old 09-07-2013 , 23:11   Re: [L4D/2] CarAlarmCulprit
    Reply With Quote #7

    Quote:
    Originally Posted by lightpro View Post
    What this plugin can do. I don't understand
    Suppose to inform the group about the car going off, but the problem is shooting next to it, or throwing stuff next to it will cause it to chirp once, which apparently also triggers his plugin. He needs to use another hook to determine if the car was startled.
    __________________
    Marcus101RR is offline
    Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 09-08-2013 , 04:57   Re: [L4D/2] CarAlarmCulprit
    Reply With Quote #8

    I found some old unreleased plugin. There is no guarantee that it works and I don't support it but may be useful.
    Attached Files
    File Type: sp Get Plugin or Get Source (caralarm.sp - 756 views - 1.0 KB)
    __________________

    Last edited by disawar1; 09-08-2013 at 04:58.
    disawar1 is offline
    Marcus101RR
    Veteran Member
    Join Date: Aug 2009
    Location: Tampa, FL
    Old 09-08-2013 , 12:42   Re: [L4D/2] CarAlarmCulprit
    Reply With Quote #9

    Quote:
    Originally Posted by disawar1 View Post
    I found some old unreleased plugin. There is no guarantee that it works and I don't support it but may be useful.
    I was not aware that the event existed...
    __________________

    Last edited by Marcus101RR; 09-08-2013 at 12:48.
    Marcus101RR is offline
    Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
    Dr. Greg House
    Professional Troll,
    Part-Time Asshole
    Join Date: Jun 2010
    Old 09-08-2013 , 20:37   Re: [L4D/2] CarAlarmCulprit
    Reply With Quote #10

    Quote:
    Originally Posted by disawar1 View Post
    I found some old unreleased plugin. There is no guarantee that it works and I don't support it but may be useful.
    Good job!
    I didn't come up with using the panic event. However I would not use the car alarm event and rather hook the car directly to find out which car was actually triggered. Also I am not sure why that clear timer exists, however, what should be done is to buffer both events (in that case the clear timer would be needed), because I don't know which one will fire at first and if that order is guaranteed to be static.
    __________________
    Santa or Satan?

    Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

    Last edited by Dr. Greg House; 09-08-2013 at 20:40.
    Dr. Greg House 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 22:42.


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