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

Show message when player suicide


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
maxolahird
Veteran Member
Join Date: Dec 2012
Old 04-21-2013 , 18:16   Show message when player suicide
Reply With Quote #1

Like everytime someone suicides it shows in chat


{TEAM}Player {DEFAULT]is no more.

Last edited by maxolahird; 04-21-2013 at 18:16.
maxolahird is offline
maxolahird
Veteran Member
Join Date: Dec 2012
Old 04-22-2013 , 13:10   Re: Show message when player suicide
Reply With Quote #2

help
maxolahird is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 04-22-2013 , 17:09   Re: Show message when player suicide
Reply With Quote #3

Code:
#include <sourcemod>

public OnPluginStart()
{
    AddCommandListener(Command_InterceptSuicide, "kill");
    AddCommandListener(Command_InterceptSuicide, "explode");
}

public Action:Command_InterceptSuicide(client, const String:command[], args)
{
    PrintToChatAll("{TEAM}%N {DEFAULT}is no more.", client);
    return Plugin_Continue;
}
Note: I didn't test this.

- Jack
Attached Files
File Type: sp Get Plugin or Get Source (suicidemessage.sp - 193 views - 338 Bytes)
Drixevel is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-22-2013 , 17:52   Re: Show message when player suicide
Reply With Quote #4

cs:s, tf2, dod, hl2dm ?
__________________
Do not Private Message @me

Last edited by Bacardi; 04-22-2013 at 17:57.
Bacardi is offline
maxolahird
Veteran Member
Join Date: Dec 2012
Old 04-23-2013 , 17:05   Re: Show message when player suicide
Reply With Quote #5

Quote:
Originally Posted by Bacardi View Post
cs:s, tf2, dod, hl2dm ?
works thx, ur a smart guy thx for using b == 0 otherwise every kill that has dmg in the shot would show up in chat
maxolahird is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-23-2013 , 17:34   Re: Show message when player suicide
Reply With Quote #6

Quote:
Originally Posted by maxolahird View Post
works thx, ur a smart guy thx for using b == 0 otherwise every kill that has dmg in the shot would show up in chat
yeah, aa.. I added that check when "attacker" userid is 0, which is "world".
- Player die by falling high to ground, "world" kills him.

Last edited by Bacardi; 04-23-2013 at 17:34.
Bacardi is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 04-24-2013 , 02:44   Re: Show message when player suicide
Reply With Quote #7

Can anybody tell me what exactly is wrong with my plugin? I'm assuming it doesn't work.

- Jack
Drixevel is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-24-2013 , 04:36   Re: Show message when player suicide
Reply With Quote #8

Quote:
Originally Posted by r3dw3r3w0lf View Post
Can anybody tell me what exactly is wrong with my plugin? I'm assuming it doesn't work.

- Jack
It does work, only when player execute (or plugin execute via player ) these two commands
kill
explode

But, it not tell did player died exactly, he can be still alive because another plugin blocked his suicide commands.
And those colors {tags} not work when compile plugin without colors include file.
It now print in chat
{TEAM}Brad {DEFAULT}is no more.

It work but different way
__________________
Do not Private Message @me
Bacardi is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 04-24-2013 , 04:38   Re: Show message when player suicide
Reply With Quote #9

Quote:
Originally Posted by Bacardi View Post
It does work, only when player execute (or plugin execute via player ) these two commands
kill
explode

But, it not tell did player died exactly, he can be still alive because another plugin blocked his suicide commands.
And those colors {tags} not work when compile plugin without colors include file.
It now print in chat
{TEAM}Brad {DEFAULT}is no more.

It work but different way
Ah, forgot the include for colors. My bad.

- Jack
Drixevel is offline
thenumb3rguy
Senior Member
Join Date: Oct 2012
Location: Hong Kong
Old 04-24-2013 , 07:03   Re: Show message when player suicide
Reply With Quote #10

Something's wrong it shows this..

99ccff$1 Integrity is no more.

everytime the message is different...
Running your plugin in CSGO.


Quote:
Originally Posted by Bacardi View Post
cs:s, tf2, dod, hl2dm ?
__________________
Founder of Hours Played, Inc.

http://steamcommunity.com/id/botarnold

Last edited by thenumb3rguy; 04-24-2013 at 07:04.
thenumb3rguy 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 23:35.


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