Raised This Month: $ Target: $400
 0% 

Solved [L4D] Hook Versus Round Start


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vit_amin
Senior Member
Join Date: Dec 2015
Location: Russian Federation
Old 09-04-2017 , 17:48   [L4D] Hook Versus Round Start
Reply With Quote #1

Left 4 Dead 2 game has event "versus_round_start", but left 4 Dead 1 has't this event. How Hook/check this ?

Last edited by Vit_amin; 10-12-2017 at 07:12.
Vit_amin is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 09-04-2017 , 18:11   Re: [L4D] Hook Versus Round Start
Reply With Quote #2

Just hook "round_start" and check for the gamemode if it's versus.
PHP Code:
public void OnPluginStart()
{
    
HookEvent("round_start"OnRoundStart);
}

public 
Action OnRoundStart(Event event, const char[] namebool dontBroadcast)
{
    
char sGameMode[16];
    
FindConVar("mp_gamemode").GetString(sGameModesizeof(sGameMode));
    if (
StrContains(sGameMode"versus"false) == -1)
    {
        return 
Plugin_Continue// not versus? ignore..
    
}
    
    
// codes here

cravenge is offline
Vit_amin
Senior Member
Join Date: Dec 2015
Location: Russian Federation
Old 09-04-2017 , 18:17   Re: [L4D] Hook Versus Round Start
Reply With Quote #3

I mean, that i want hook/check moment when Ghost Zombies can spawn and start Versus Round (example cmd: director_force_versus_start)
Vit_amin is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 09-04-2017 , 18:21   Re: [L4D] Hook Versus Round Start
Reply With Quote #4

I just played L4D again last month and that event captures everything. Also, ghost infected can spawn once the survivors leave the safe room and the versus round automatically starts.

Unless you're talking about something else, that's much what I can do.

Last edited by cravenge; 09-04-2017 at 18:22.
cravenge is offline
Vit_amin
Senior Member
Join Date: Dec 2015
Location: Russian Federation
Old 09-04-2017 , 18:24   Re: [L4D] Hook Versus Round Start
Reply With Quote #5

When Survivors leave the safe room - start Versus. And i want hook this event.
L4D2 - has event "versus_round_start"
L4D1 - ???

Last edited by Vit_amin; 09-04-2017 at 18:25.
Vit_amin is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 09-04-2017 , 18:45   Re: [L4D] Hook Versus Round Start
Reply With Quote #6

Quote:
Originally Posted by Vit_amin View Post
[...]
Quote:
Originally Posted by cravenge View Post
Just hook "round_start" and check for the gamemode if it's versus.
Quote:
Originally Posted by cravenge View Post
Also, ghost infected can spawn once the survivors leave the safe room and the versus round automatically starts.
cravenge is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 09-05-2017 , 09:03   Re: [L4D] Hook Versus Round Start
Reply With Quote #7

Quote:
Originally Posted by Vit_amin View Post
Left 4 Dead 2 game has event "versus_round_start", but left 4 Dead 1 has't this event. How Hook/check this ?
player_left_start_area is 98 % similar to versus_round_start
Visual77 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 05:05.


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