Raised This Month: $ Target: $400
 0% 

[L4D2] Who called the horde?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
-.-Owned Myself-.-
Member
Join Date: Jul 2008
Old 11-13-2010 , 08:39   Re: [L4D2] Who called the horde?
Reply With Quote #2

I made this little plugin in about 10 minutes using the "create_panic_event" event. I haven't tested this but it should compile and work somewhat though on the events page it says this event doesn't always occur when the panic event actually occurs.

PHP Code:
/* Left 4 Dead 2 Panic Events */

#include <sourcemod>

public OnPluginStart()
{
    
/* Hook Panic Create event after it has happened */
    
HookEvent("create_panic_event"OnPanicCreate);
}

public 
Action:OnPanicCreate(Handle:event, const String:name[], bool:dontBroadcast)
{
    
/* Copy the UserID from the event over */
    
new uId GetEventInt(event"userid");
    
/* Now get the person's name */
    
new client GetClientOfUserId(uId);
    new 
cName[MAX_NAME_LENGTH];
    
GetClientName(clientcNamesizeof(cName));
    
/* Now tell everyone who created the event */
    
PrintToChatAll("\x03[Panic Event]\x01 %s created a panic event!"cName);

Attached Files
File Type: sp Get Plugin or Get Source (l4d2panicstarter.sp - 451 views - 644 Bytes)
-.-Owned Myself-.- is offline
 



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 14:15.


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