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

Witch crown announce?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
titan_rw
Member
Join Date: Sep 2009
Old 10-03-2009 , 02:15   Witch crown announce?
Reply With Quote #1

Hi.

Just wondering if something like this exists? I looked through the plugins there are, and didn't see anything.

Basically announce to all players when any player truely 'crowns' the witch, as in one shot kill, not just kills the witch without dieing (ie spamming autoshotty).

Too many people kill a witch with 2-3 shells, and claim they crowned her. It would be nice to have a true 1 shell witch kill announced to all players.

I don't know if this is possible with sourcemod.

Anybody?

Thanks.
titan_rw is offline
Kevin_b_er
SourceMod Donor
Join Date: Feb 2009
Old 10-03-2009 , 03:02   Re: Witch crown announce?
Reply With Quote #2

It's actually quite easy. The witch death event includes the 'oneshot' flag which corresponds to a cr0wned witch.

Here's an example plugin that should announce whenever a player gets one of these kills as "PLAYER cr0wned a witch!" in the game chat. Don't know how to do one of those neat on-screen messages l4d can do, else I'd probably have done that for good measure.


Disclaimer: I didn't test it. Exercise is left for the reader.
Attached Files
File Type: sp Get Plugin or Get Source (l4dcr0wnannounce.sp - 519 views - 873 Bytes)

Last edited by Kevin_b_er; 10-03-2009 at 03:10.
Kevin_b_er is offline
olj
Veteran Member
Join Date: Jun 2009
Old 10-03-2009 , 03:16   Re: Witch crown announce?
Reply With Quote #3

The witch_kill event has "oneshot" key which denotes actual crowning. Try this. It uses chat area for message. Oh, lol, Kevin already done it. You can try my if you need colored message though
Attached Files
File Type: sp Get Plugin or Get Source (WitchCrownAnnounce.sp - 588 views - 1.3 KB)
__________________

Last edited by olj; 10-03-2009 at 03:19.
olj is offline
titan_rw
Member
Join Date: Sep 2009
Old 10-04-2009 , 13:18   Re: Witch crown announce?
Reply With Quote #4

Wow, thanks guys. I'll try it (one of them) out.

Thanks again.
titan_rw is offline
triggerman
Senior Member
Join Date: Jun 2009
Old 10-05-2009 , 01:56   Re: Witch crown announce?
Reply With Quote #5

olj can you set yours up to make the message look like an achievement message? even just post what the printtochatall line should be.

Last edited by triggerman; 10-05-2009 at 01:58.
triggerman is offline
titan_rw
Member
Join Date: Sep 2009
Old 10-05-2009 , 10:11   Re: Witch crown announce?
Reply With Quote #6

I used olj's version, but changed it a little to show a message when oneshot is false. So the person knows for sure they didn't get the crown.

Code:
public Action:EventWitchDeath(Handle:event, const String:name[], bool:dontBroadcast)
 {
  new killer = GetClientOfUserId(GetEventInt(event, "userid"));
  if (!IsValidClient(killer)) return;
  decl String:killername[MAX_NAME_LENGTH];
  GetClientName(killer, killername, MAX_NAME_LENGTH);
  if (GetEventBool(event, "oneshot"))
   {
    PrintToChatAll("\x03%s \x04CROWNED the witch!", killername);
   }
   else
   {
    PrintToChatAll("\x03%s \x04has \x03FAILED \x04to crown the witch!", killername);
   }
 }
Of course you still get the failed message when you weren't trying to crown. Such as when a teammate startles the witch, gets incapped, and you unload into the witch before she shreds the other guy. Not really trying to crown, just kill quickly. Ohh well.

I'm about 95% for a true crown. On advanced and lower, I only use 1 shell anyway. On expert, I may click-spam if I'm not super confident at the time. With this plugin I can still tell if I did crown or not.

Thanks again.
titan_rw 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 19:21.


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