[FilterScript] Anti Team Kill Kick
#1

Filterscript: Anti Team Kill Kick
Description: This will kick anyone who team kills the first time they kill a teammate
-------------------------------------------
Introduction
Hello guys, I'm DJTunes. I'm back with another filterscript. This filterscript is a filterscript that I actually think works pretty good. I give you an Anti Team Kill Kick. An Anti Team Kill Kick? Yes, this Anti Team Kill Kick will kick anyone from your server who kills another teammate. I haven't got to try this out myself yet due to not having anyone test it out with me. If you experience not being kicked if you team kill, or if you don't experience someone else being kicked after team killing you, please reply to this thread saying so.

What is this good for?
I always include this section in all of my releases because I get asked a lot "Why would I need this?". Here is your answer. If you were getting spawn killed, and team killed at the same time, trying to run would do nothing. Having a team kill system that would kill them, and take away their money is kind of useful. Though, most team killers just go on servers just to piss people off, not to care about their money. Another example is some servers have a rule where that since you've been warned, you get no warnings so this would be good for you.

Credits
All the credits go to me

Installation
To add this filterscript to your server just download the server package using mediafire, or copy the paste on pastebin, and paste it to PAWN/PAWNO and compile it. After download it from mediafire, or compiling it using PAWN, go to your server rcon panel. Log in, and now go to "Web FTP", or however you upload Filterscripts to your server. Now upload the .amx to your /filterscripts. Now go on server.cfg and add "AntiTeamKill" right after "filterscripts"

Download
Pastebin: http://pastebin.com/x6MYpew6
Mediafire: http://www.mediafire.com/?to1wggz7el5xy17
Reply
#2

Cool and awesome man! This filterscript is awesome i used it in my server! Keep working hard to become a high roller! I give you REP +
Reply
#3

Quote:
Originally Posted by navroopsingh
Посмотреть сообщение
Cool and awesome man! This filterscript is awesome i used it in my server! Keep working hard to become a high roller! I give you REP +
Thanks man!
Thanks for the rep to!
Reply
#4

Dude you defined like 50 colors, and used 1... LOL, anyway, thanks bro... +REP

Код:
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_RED 0xAA3333AA
#define yellow 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_VIOLET 0x9955DEEE
#define COLOR_LIGHTRED 0xFF99AADD
#define COLOR_SEAGREEN 0x00EEADDF
#define COLOR_GRAYWHITE 0xEEEEFFC4
#define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
#define COLOR_GREENISHGOLD 0xCCFFDD56
#define COLOR_LIGHTBLUEGREEN 0x0FFDD349
#define COLOR_NEUTRALBLUE 0xABCDEF01
#define COLOR_LIGHTCYAN 0xAAFFCC33
#define COLOR_LEMON 0xDDDD2357
#define COLOR_MEDIUMBLUE 0x63AFF00A
#define COLOR_NEUTRAL 0xABCDEF97
#define COLOR_BLACK 0x00000000
#define COLOR_NEUTRALGREEN 0x81CFAB00
#define COLOR_DARKGREEN 0x12900BBF
#define COLOR_LIGHTGREEN 0x24FF0AB9
#define COLOR_DARKBLUE 0x300FFAAB
#define COLOR_BLUEGREEN 0x46BBAA00
#define COLOR_PINK 0xFF66FFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_PURPLE 0x800080AA
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define red 0xFF0000AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BROWN 0x993300AA
#define COLOR_CYAN 0x99FFFFAA
#define COLOR_TAN 0xFFFFCCAA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_KHAKI 0x999900AA
#define COLOR_LIME 0x99FF00AA
#define COLOR_SYSTEM 0xEFEFF7AA
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD4 0xD8D8D8FF
#define COLOR_GRAD6 0xF0F0F0FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD1 0xB4B5B7FF //<< THE ONLY ONE YOU USED
Reply
#5

Hmm..

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
        if(GetPlayerTeam(killerid) == GetPlayerTeam(playerid))
        {
        Kick(killerid);
        SendClientMessage(killerid, COLOR_GRAD1, "You've been kicked for killing a teammate !");
        return 1;
}
}
Why is SendClientMessage after Kick(playerid)? If you want the text to show, then the SendClientMessage must be on top of Kick(playerid), like -;

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
        if(GetPlayerTeam(killerid) == GetPlayerTeam(playerid))
        {
        SendClientMessage(killerid, COLOR_GRAD1, "You've been kicked for killing a teammate !");
        Kick(killerid);
        return 1;
}
}
This should more-of be as a snippet.. since the code is small and not actually is a filterscript.
Reply
#6

this script is wrong in many ways;
first you defined up to 50 colors or more..... and used only 1 of them.
second, you kicked the player , and than you send him a message ? That is not correct, he wont get anything.
and lastly -
https://sampwiki.blast.hk/wiki/SetPlayerTeam

This function is uniqe because its have his own ANTI TEAM KILL.


But hey! you did try to make your own FS,
Dont give up.
Reply
#7

You can use this :
Код:
OnPlayerTakeDamage
so players wouldn't even be affected by teammates shoots.
Anyways, nice job as the beginning.
Reply
#8

Quote:
Originally Posted by DeMoX
Посмотреть сообщение
You can use this :
Код:
OnPlayerTakeDamage
so players wouldn't even be affected by teammates shoots.
Anyways, nice job as the beginning.
Thank you very much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)