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

[L4D2] Hook Map Progress


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RU_6uK
SourceMod Donor
Join Date: May 2010
Old 01-28-2011 , 05:05   [L4D2] Hook Map Progress
Reply With Quote #1

The game displays the message: the players were 25% (50%, 75%) of the map. How to hook this event? Is this possible?
RU_6uK is offline
seattle_ice
Member
Join Date: Dec 2010
Old 02-03-2011 , 12:45   Re: [L4D2] Hook Map Progress
Reply With Quote #2

Hook the event "versus_marker_reached" for versus.
seattle_ice is offline
RU_6uK
SourceMod Donor
Join Date: May 2010
Old 02-04-2011 , 10:30   Re: [L4D2] Hook Map Progress
Reply With Quote #3

Thank you!
Can you show example of code? If the survivors were 75% of the map.

PHP Code:
public OnPluginStart()
{
    
HookEvent("versus_marker_reached"Event_VersusMarker);
}

public 
Action:Event_VersusMarker(Handle:event, const String:name[], bool:dontBroadcast)
{
    ????????

RU_6uK is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 02-04-2011 , 12:22   Re: [L4D2] Hook Map Progress
Reply With Quote #4

http://wiki.alliedmods.net/Left_4_Dead_2_Events

short userid
short marker


new client = GetClientOfUserId(event, "userid");
new progress = GetEventInt(event, "marker");
AtomicStryker is offline
RU_6uK
SourceMod Donor
Join Date: May 2010
Old 02-04-2011 , 19:40   Re: [L4D2] Hook Map Progress
Reply With Quote #5

Ok

PHP Code:
public OnPluginStart() 

    
HookEvent("versus_marker_reached"Event_VersusMarker); 


public 
Action:Event_VersusMarker(Handle:event, const String:name[], bool:dontBroadcast

    new 
progress GetEventInt(event"marker");

    if (
progress == 75// edited
    
{
         do 
something;
    }

That would be correct?

Last edited by RU_6uK; 02-05-2011 at 23:49. Reason: (progress == 75) instead of (progress > 75)
RU_6uK is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 02-05-2011 , 03:53   Re: [L4D2] Hook Map Progress
Reply With Quote #6

Can't you just output the numbers?
__________________
FaTony is offline
Glide Loading
Member
Join Date: May 2010
Old 02-06-2011 , 07:31   Re: [L4D2] Hook Map Progress
Reply With Quote #7

Is any way to hook (for example) 19%, 41% and so on progress ?
Glide Loading 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 17:56.


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