Hay! So I came up with this cool idea, I got some help with it here before on this thread:
https://forums.alliedmods.net/showthread.php?t=318291
But now I also want to convert teamdamage bans (the ban you get when you teamkill in the start or deal to much damage to teammates) into a Sourceban ban. But I'm having some issues to find the reason for each ban.
So here is what I need help with: In the code on the thread I showed, the plugin checks for the reason 'Kicked by Console', but all kind of kick reasons (votekicked, to much damage, damage on start of round) has the reason 'Kicked by Console' so I want to get a more specified reason on each reason to get kicked.
I tried this...
PHP Code:
if (StrContains(sReason, "You have been voted off", false) != -1)
{
SBPP_BanPlayer( 0, client, 30, "Votekicked");
}
else if (StrContains(sReason, "For doing too much team damage", false) != -1)
{
SBPP_BanPlayer( 0, client, 30, "Teamdamage/killing");
}
but that didnt work. So does someone know what the specific reason are when you get
votekicked,
dealing to much damage and
kill on round start?
This is the console outputs when you get kicked for each way to get kicked:
Votekicked:
Code:
Dropped Player from server: Kicked by Console : You have been voted off
Dealing to much damage:
Code:
Dropped Player from server: Kicked by Console : For doing too much team damage
Kill on round start:
Code:
Dropped Player from server: Kicked by Console : For killing a teammate at round start
To sum it up:
How do i specify these three kick reasons so I can set different length and reasons?
Thanks in advance