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

[L4D1 & L4D2][DEV] Say Events Fork


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Plugin ID:
8040
Plugin Version:
1.4
Plugin Category:
Technical/Development
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Displays and logging triggered events and forwards.
    Old 04-25-2022 , 09:59   [L4D1 & L4D2][DEV] Say Events Fork
    Reply With Quote #1

    Author: disawar1 [raziEiL] (fork by Dragokas)

    Description:
    For plugin developers.

    Reports in log and chat area the names of events and forwards fire at the moment.
    Features:
    - all events splitted by Post & Pre
    - forwards are supplied with client index if possible
    - on round end additional info is collected (similar to Entity Limits Logger), such as:
    * total entities
    * precache info
    * client weapons
    * saferoom entities
    Logfile location:
    - addons/sourcemod/logs/say_event.log
    Settings (ConVars):
    Located at: cfg/sourcemod/say_event.cfg

    - say_event_enable - def.: 1 - Log Events: 0=Disable, 1=Enable
    Commands:
    - Nothing
    Installation:
    - copy smx file to addons/sourcemod/plugins/
    References
    - [L4D & L4D2] Say Event | for devs by disawar1 (original plugin)
    Attached Files
    File Type: sp Get Plugin or Get Source (say_event_all.sp - 306 views - 23.3 KB)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 04-28-2022 at 10:40.
    Dragokas is offline
    Hawkins
    Senior Member
    Join Date: Jul 2021
    Old 04-28-2022 , 05:45   Re: [L4D1 & L4D2] Say Events Fork
    Reply With Quote #2

    Would it help in debugging crashes, or is it too late to log when crash happens?
    Hawkins is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 04-28-2022 , 05:46   Re: [L4D1 & L4D2] Say Events Fork
    Reply With Quote #3

    Quote:
    Originally Posted by Hawkins View Post
    Would it help in debugging crashes, or is it too late to log when crash happens?
    Depends if crash happens after event. Better use Accelerator extension to identify exactly where server is crashing.
    __________________
    Silvers is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 04-28-2022 , 10:39   Re: [L4D1 & L4D2] Say Events Fork
    Reply With Quote #4

    Hawkins, it depends. Indirectly and very inaccurate. If you know what plugin the mentioned event name is coming from, it may narrow search area.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    ZBzibing
    Senior Member
    Join Date: Dec 2012
    Old 07-17-2022 , 07:32   Re: [L4D1 & L4D2][DEV] Say Events Fork
    Reply With Quote #5

    125 explain_radio
    126 explain_gas_truck
    127 explain_panic_button
    128 explain_elevator_button
    129 explain_lift_button
    130 explain_church_door
    131 explain_emergency_door
    132 explain_crane
    133 explain_bridge
    134 explain_gas_can_panic
    135 explain_van_panic
    136 explain_mainstreet
    137 explain_train_lever
    138 explain_disturbance
    Are these still useful in events now? I try to trigger them in the game, any prompt feedback every day

    Code:
    public void OnPluginStart()
    {
    	//RegAdminCmd("sm_zmob", Command_ZspawnMob, ADMFLAG_ROOT, "触发尸潮.");
    	HookEvent("player_use", Event_PlayerUse);
    	
    	HookEvent("explain_pre_radio", Event_explainpanic);
    	HookEvent("started_pre_radio", Event_explainpanic);
    	HookEvent("explain_radio", Event_explainpanic);
    	HookEvent("explain_gas_truck", Event_explainpanic);
    	HookEvent("explain_panic_button", Event_explainpanic);
    	HookEvent("explain_elevator_button", Event_explainpanic);
    	HookEvent("explain_lift_button", Event_explainpanic);
    	HookEvent("explain_church_door", Event_explainpanic);
    	HookEvent("explain_emergency_door", Event_explainpanic);
    	HookEvent("explain_crane", Event_explainpanic);
    	HookEvent("explain_bridge", Event_explainpanic);
    	HookEvent("explain_gas_can_panic", Event_explainpanic);
    	HookEvent("explain_van_panic", Event_explainpanic);
    	HookEvent("explain_mainstreet", Event_explainpanic);
    	HookEvent("explain_train_lever", Event_explainpanic);
    	HookEvent("explain_disturbance", Event_explainpanic);
    }
    //--------------------Event--------------------//
    public void Event_explainpanic(Event event, const char[] name, bool dontBroadcast)
    {
    	PrintToChatAll("\x04[SM] button was pressed!!!");
    }
    __________________
    Please forgive, If I'm not describing it accurately. I use google translate
    Functional tests are all from L4D1, and are only keen to solve and fix various bugs of L4D1:
    ZBzibing is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 07-17-2022 , 08:41   Re: [L4D1 & L4D2][DEV] Say Events Fork
    Reply With Quote #6

    It's not when the the button was pressed but when the instructor hint shows how to use those buttons/events. If you want to hook button press use Stripper:Source to dump the maps entities and find the relative button/logic entity and use HookSingleEntityOutput(). You can see an example of this in "Lift Music" plugin I wrote.
    __________________
    Silvers is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 07-17-2022 , 13:26   Re: [L4D1 & L4D2][DEV] Say Events Fork
    Reply With Quote #7

    ZBzibing, you can also use Silver's Input Hooks to track button name/class dynamically.

    Just install it, enable it ("sm_input_listen") and press the desired button.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    ZBzibing
    Senior Member
    Join Date: Dec 2012
    Old 07-23-2022 , 06:02   Re: [L4D1 & L4D2][DEV] Say Events Fork
    Reply With Quote #8

    Many thanks to Silvers, Dragokas, I did see the example, was very inspired and tried the method very well
    __________________
    Please forgive, If I'm not describing it accurately. I use google translate
    Functional tests are all from L4D1, and are only keen to solve and fix various bugs of L4D1:
    ZBzibing 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 08:11.


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