Raised This Month: $23 Target: $400

Solved [L4D2] question func_button_timed

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Junior Member
Join Date: Nov 2021
Old 04-03-2024 , 07:43   [L4D2] question func_button_timed
Reply With Quote #1

Entity A is the parent of entity B, entity B is func_button_timed

Entity A has 10 seconds to be deleted:
PHP Code:
  SetVariantString("OnUser1 ! Self: kill: : 10.0:1 ");
When I hook: HookSingleEntityOutput(B, "OnTimeUp", OnTimeUp);

Perform the button progress bar (5 seconds) function in the OnTimeUp callback. If Entity A is deleted within 5 seconds, the player will be frozen

How to solve this problem?

Last edited by Solar1234; 04-03-2024 at 09:19.
Solar1234 is offline
Senior Member
Join Date: Sep 2021
Old 04-18-2024 , 06:32   Re: [L4D2] question func_button_timed
Reply With Quote #2

This is because the button is not disabled before remove it. To due this problem you can hook OnEntityDestory and disabled the button.
LinLinLin is offline

Thread Tools
Display Modes

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:28.

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