Raised This Month: $ Target: $400
 0% 

[Req] Simple Slay on Team Kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thebro
Senior Member
Join Date: Jan 2011
Old 05-13-2013 , 23:30   [Req] Simple Slay on Team Kill
Reply With Quote #1

Hello. I tried ATAC, idk if its possible for it to automatically Slay instead of showing a menu.
Or if Restricting "Forgive" is possible.

Either way I am looking for a simple Slay on Teamkill.
For example,

"Player kills Teammate"
Slay player and play sound "bo/slay.wav"

Player kills a total of 3 teammates
Kick player and play sound to server "bo/kick.wav"


Please and thankyou!

Last edited by thebro; 05-13-2013 at 23:58.
thebro is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-13-2013 , 23:38   Re: [Req] Simple Slay on Team Kill
Reply With Quote #2

how many times can player TK before kick...?
__________________
Blizzard_87 is offline
thebro
Senior Member
Join Date: Jan 2011
Old 05-13-2013 , 23:58   Re: [Req] Simple Slay on Team Kill
Reply With Quote #3

I'm sorry, i forgot to put that.

Player can TK 3 times, then kick.
thebro is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-14-2013 , 00:09   Re: [Req] Simple Slay on Team Kill
Reply With Quote #4

try this havent tested fully as im at work atm.

Code:
/*     Blizzards Plugins Comply With GNU General Public License     TK Punish is free software: you can redistribute it and/or modify     it under the terms of the GNU General Public License as published by     the Free Software Foundation, either version 3 of the License, or     (at your option) any later version.         Under no circumstances are you allowed to redistribute and/or modify     it claming that you are the original author of such plugin/modification.         TK Punish is distributed in the hope that it will be useful,     but WITHOUT ANY WARRANTY; without even the implied warranty of     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     GNU General Public License for more details.         You should have received a copy of the GNU General Public License     along with this program.  If not, see <http://www.gnu.org/licenses/>.     */ #include < amxmodx > #include < amxmisc > #include < fun > #include < cstrike > #pragma semicolon 1 #define PLUGIN "TK Punish" #define VERSION "1.0" #define AUTHOR "Blizzard" new g_iTkCount[ 33 ]; new g_iTkTotal; new g_sSlay[] = { "bo/slay" }; new g_sKick[] = { "bo/kick" }; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);         register_event( "DeathMsg", "Event_DeathMsg", "a" );         g_iTkTotal = register_cvar( "amx_tk_total", "3" ); } public plugin_precache() {     precache_sound( g_sKick );     precache_sound( g_sSlay ); } public client_connect( id ) g_iTkCount[ id ] = 0; public Event_DeathMsg() {     new iKiller = read_data( 1 );     new iVictim = read_data( 2 );         new TkTotal = get_pcvar_num( g_iTkTotal );         if( iVictim != iKiller )     {         if( cs_get_user_team( iKiller ) == cs_get_user_team( iVictim ) )         {             if( g_iTkCount[ iKiller ] >= TkTotal )             {                 set_task( 5.0, "KickTKiller", iKiller );                 client_cmd( 0, "spk %s", g_sKick );             }             else {                 user_silentkill( iKiller );                 client_cmd( 0, "spk %s", g_sSlay );                 g_iTkCount[ iKiller ]++;             }         }     } } public KickTKiller( id ) {     server_cmd( "kick #%i ^"You Killed To Many Players On Your Team!^"", get_user_userid(id) ); }
__________________

Last edited by Blizzard_87; 05-14-2013 at 00:09.
Blizzard_87 is offline
thebro
Senior Member
Join Date: Jan 2011
Old 05-14-2013 , 00:10   Re: [Req] Simple Slay on Team Kill
Reply With Quote #5

Will do, Thanks in advance!
I'll let you know how it goes
thebro is offline
thebro
Senior Member
Join Date: Jan 2011
Old 05-14-2013 , 00:16   Re: [Req] Simple Slay on Team Kill
Reply With Quote #6

The Slay works. But I think CSDM is conflicting with it. The Player won't respond.
Sorry if I didn't mention CSDM is being used.

Is it possible to respawn the player? And if so, can it be a 10 Second delay?

Last edited by thebro; 05-14-2013 at 00:19.
thebro is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-14-2013 , 00:44   Re: [Req] Simple Slay on Team Kill
Reply With Quote #7

Quote:
Originally Posted by thebro View Post
The Slay works. But I think CSDM is conflicting with it. The Player won't respond.
Sorry if I didn't mention CSDM is being used.

Is it possible to respawn the player? And if so, can it be a 10 Second delay?
I can add a respawn after 10 seconds once get on my computer.
__________________
Blizzard_87 is offline
thebro
Senior Member
Join Date: Jan 2011
Old 05-14-2013 , 01:43   Re: [Req] Simple Slay on Team Kill
Reply With Quote #8

Thankyou very much!
thebro is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-14-2013 , 06:37   Re: [Req] Simple Slay on Team Kill
Reply With Quote #9

ok got it working respawning the team attacker but, does your current plugin respawn the player that the TK attacked?

Code:
/*     Blizzards Plugins Comply With GNU General Public License     TK Punish is free software: you can redistribute it and/or modify     it under the terms of the GNU General Public License as published by     the Free Software Foundation, either version 3 of the License, or     (at your option) any later version.         Under no circumstances are you allowed to redistribute and/or modify     it claming that you are the original author of such plugin/modification.         TK Punish is distributed in the hope that it will be useful,     but WITHOUT ANY WARRANTY; without even the implied warranty of     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     GNU General Public License for more details.         You should have received a copy of the GNU General Public License     along with this program.  If not, see <http://www.gnu.org/licenses/>.     */ #include < amxmodx > #include < amxmisc > #include < fun > #include < cstrike > #include < hamsandwich > #pragma semicolon 1 #define PLUGIN "TK Punish" #define VERSION "1.0" #define AUTHOR "Blizzard" #define TASK_COUNTDOWN 123456 new g_iTkCount[ 33 ]; new g_iTkTotal; new g_iTimer; new REVIVE_TIME; new g_sSlay[] = { "bo/slay" }; new g_sKick[] = { "bo/kick" }; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);         register_event( "DeathMsg", "Event_DeathMsg", "a" );         g_iTkTotal = register_cvar( "amx_tk_total", "3" );     REVIVE_TIME = register_cvar( "amx_tk_revivetime", "10" ); } public plugin_precache() {     precache_sound( g_sKick );     precache_sound( g_sSlay ); } public client_connect( id ) g_iTkCount[ id ] = 0; public Event_DeathMsg() {     new iKiller = read_data( 1 );     new iVictim = read_data( 2 );         new TkTotal = get_pcvar_num( g_iTkTotal );         if( iVictim != iKiller )     {         if( cs_get_user_team( iKiller ) == cs_get_user_team( iVictim ) )         {             if( g_iTkCount[ iKiller ] > TkTotal )             {                 set_task( 5.0, "KickTKiller", iKiller );                 client_cmd( 0, "spk %s", g_sKick );             }             else {                 user_silentkill( iKiller );                 g_iTimer = ( get_pcvar_num( REVIVE_TIME ) + 1 );                 ReviveCountdown( iKiller );                 client_cmd( 0, "spk %s", g_sSlay );                 g_iTkCount[ iKiller ]++;             }         }     } } public ReviveCountdown(id) {       --g_iTimer;         set_hudmessage(random(256), random(256), random(256), -1.0,-1.0, 1, 6.0, 1.0, 0.0, 0.0);     if( g_iTimer == 0 )     {         show_hudmessage( id, "FIGHT!!!");                 ExecuteHamB( Ham_CS_RoundRespawn, id );                 remove_task(TASK_COUNTDOWN);                 g_iTimer = ( get_pcvar_num( REVIVE_TIME ) + 1 );                 return;     }         show_hudmessage( id, "Respawn In %i Second(s)", g_iTimer);         set_task(1.0, "ReviveCountdown", id); } public KickTKiller( id ) {     server_cmd( "kick #%i ^"You Killed To Many Players On Your Team!^"", get_user_userid(id) ); }

try this out... it respawns team killer after 10 secs

editable from cvar
Code:
 amx_tk_revivetime "10"
__________________

Last edited by Blizzard_87; 05-14-2013 at 06:41.
Blizzard_87 is offline
thebro
Senior Member
Join Date: Jan 2011
Old 05-14-2013 , 14:52   Re: [Req] Simple Slay on Team Kill
Reply With Quote #10

I'll try this when I get home, looks promising!
And the CSDM does respawn players but not when they TK.
The respawn feature you made should fix the problem

And the cvar thing is a perfect addition! Customizable!!
thebro 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 21:42.


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