Raised This Month: $61 Target: $400
 15% 

[L4D2] Rescue vehicle leave timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
darkbret
Junior Member
Join Date: Sep 2019
Old 11-12-2020 , 22:23   [L4D2] Rescue vehicle leave timer
Reply With Quote #1

Hello,

Since on a crowded server, when rescue vehicle arrived, survivors keep hanging around for farming points. I need a plugin when rescue vehicle arrived and a timer will display how many time left for vehicle leaving. If anyone not on rescue vehicle or zone, slay them all.
darkbret is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 11-13-2020 , 01:52   Re: [L4D2] Rescue vehicle leave timer
Reply With Quote #2

Man.. i thought i was cruel until i saw your post. Why not just create a Smoker particle around them and let them take damage slowly and steady? Now that real evil.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
darkbret
Junior Member
Join Date: Sep 2019
Old 11-13-2020 , 21:46   Re: [L4D2] Rescue vehicle leave timer
Reply With Quote #3

Quote:
Originally Posted by GsiX View Post
...
No, if just 1-2 players, tanks can easily kill them. But the problem is we have 5-6 players hanging around. Smoker too weak to handle them

Quote:
Originally Posted by Marttt View Post
...
Thank you for your advise. I will try.
darkbret is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-13-2020 , 07:19   Re: [L4D2] Rescue vehicle leave timer
Reply With Quote #4

Cruel is having to restart an entire map because of 1 or 2 teammates.

So darkbret maybe is possible by hooking OnTouch in the rescue vehicle,

I think all "finales" with vehicles have that, usually, you can find which entity is by dumping the map with stripper and looking for "OnEntireTeamStartTouch" text.

Probably one of the entities with this is one of the rescue triggers. (e.g c1m4 is targetname = "trigger_escape")
__________________
Marttt is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 11-16-2020 , 10:55   Re: [L4D2] Rescue vehicle leave timer
Reply With Quote #5

Quote:
Originally Posted by Marttt View Post
maybe is possible by hooking OnTouch in the rescue vehicle,
I maybe do something wrong,
does not work, I have tried it
PHP Code:
{
    
int entity FindEntityByClassname(-1"trigger_multiple");
    if(
entity == -1)
    {
        return;
    }

    
SDKHook(entitySDKHook_StartTouchOnStartTouch);
    
SDKHook(entitySDKHook_EndTouchOnEndTouch);
}

public 
void OnStartTouch(int entityint other)
{
    
PrintToChatAll("OnStartTouch: %d, other: %d"entityother); //didn't happen
    
    
if (bFinalVehicleReady && other && other <= MaxClients && IsClientInGame(other))
    {
        
g_bClientInVehicle[other] = true;
    }
}

public 
void OnEndTouch(int entityint other)
{
    
PrintToChatAll("OnEndTouch: %d, other: %d"entityother); //didn't happen
    
    
if (bFinalVehicleReady && other && other <= MaxClients && IsClientInGame(other))
    {
        
g_bClientInVehicle[other] = false;
    }

Spoiler
__________________

Last edited by HarryPotter; 11-16-2020 at 22:19.
HarryPotter is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 11-16-2020 , 11:30   Re: [L4D2] Rescue vehicle leave timer
Reply With Quote #6

Quote:
Originally Posted by HarryPotter View Post
I maybe do something wrong,
does not work, I have tried it
PHP Code:
{
    
int entity FindEntityByClassname(iFinalEscapeEnt"trigger_multiple");
    if(
entity == -1)
    {
        return;
    }

    
SDKHook(entitySDKHook_StartTouchOnStartTouch);
    
SDKHook(entitySDKHook_EndTouchOnEndTouch);
}

public 
void OnStartTouch(int entityint other)
{
    
PrintToChatAll("OnStartTouch: %d, other: %d"entityother); //didn't happen
    
    
if (bFinalVehicleReady && other && other <= MaxClients && IsClientInGame(other))
    {
        
g_bClientInVehicle[other] = true;
    }
}

public 
void OnEndTouch(int entityint other)
{
    
PrintToChatAll("OnEndTouch: %d, other: %d"entityother); //didn't happen
    
    
if (bFinalVehicleReady && other && other <= MaxClients && IsClientInGame(other))
    {
        
g_bClientInVehicle[other] = false;
    }

Spoiler
Try hooking the OnStartTouch and OnEndTouch outputs of the entity instead.
PHP Code:
public void OnEntityCreated(int entity, const char[] classname)
{
    if (
entity MaxClients && IsValidEntity(entity) && StrEqual(classname"trigger_multiple"))
    {
        
HookSingleEntityOutput(entity"OnStartTouch"EventTriggerHook);
        
HookSingleEntityOutput(entity"OnEndTouch"EventTriggerHook);
    }
}

public 
void EventTriggerHook(const char[] outputint callerint activatorfloat delay)
{
    if (
caller MaxClients && IsValidEntity(caller) && activator <= MaxClients && IsClientInGame(activator))
    {
        if (
StrEqual(output"OnStartTouch"false))
        {
            
PrintToChatAll("%N started touching %d"activatorcaller);
        }
        else if (
StrEqual(output"OnEndTouch"false))
        {
            
PrintToChatAll("%N stopped touching %d"activatorcaller);
        }
    }

__________________
Psyk0tik is offline
spaghettipastaman
Member
Join Date: May 2021
Old 01-09-2022 , 04:48   Re: [L4D2] Rescue vehicle leave timer
Reply With Quote #7

What if the rescue vehicle timer went up and all players died, and it also triggered the cutscene of it leaving
spaghettipastaman is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 01-09-2022 , 06:22   Re: [L4D2] Rescue vehicle leave timer
Reply With Quote #8

Quote:
Originally Posted by spaghettipastaman View Post
What if the rescue vehicle timer went up and all players died, and it also triggered the cutscene of it leaving
Did it happen already in your server?
__________________

Last edited by HarryPotter; 01-09-2022 at 06:22.
HarryPotter is offline
spaghettipastaman
Member
Join Date: May 2021
Old 01-09-2022 , 17:42   Re: [L4D2] Rescue vehicle leave timer
Reply With Quote #9

Quote:
Originally Posted by HarryPotter View Post
Did it happen already in your server?
I probably worded that bad, but what I meant was a suggestion that the animation plays of the rescue leaving if all players die (and none were in the vehicle)
spaghettipastaman is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 11-19-2020 , 09:50   Re: [L4D2] Rescue vehicle leave timer
Reply With Quote #10

Rescue vehicle leave timer Version(2023/3/21 )
When rescue vehicle arrived and a timer will display how many time left for vehicle leaving. If a player is not on rescue vehicle or zone, slay him

-Original Request by darkbret.
-Thanks to Marttt and Crasher_3637.


-Video-


-Feature-
-Works on all custom map
-Works on l4d2 all value maps.
-Custom timer for each final map (edit data).
-Translation support
-The City Will Get Nuked After Countdown Time Passes
-Silvers F18 Airstrike

Apply to:
l4d2

-Require-
1. Left 4 DHooks Direct
2. [INC] Multi Colors


-Edit Github-
Latest version always here
__________________

Last edited by HarryPotter; 03-20-2023 at 20:17.
HarryPotter is offline
Reply


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 20:24.


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