View Full Version : Ban players if lose in competetive mod
Can someone make a simple plugin which bans all players in the losing team? When the match is over.
This is for competetive mod.
CT 16 - 7 T
All players in T team are banned for 30 minutes.
Im bumping this thread. Anyone? Should be a simple script. Holding fingers that someone will solve this.
Anyone? Come on coders :D
rogeraabbccdd
07-27-2016, 10:54
Try This.
I haven't test yet.
https://github.com/rogeraabbccdd/CSGO-BanLoseTeam
Mitchell
07-27-2016, 11:41
Try This.
I haven't test yet.
https://github.com/rogeraabbccdd/CSGO-BanLoseTeam
https://github.com/rogeraabbccdd/CSGO-BanLoseTeam/blob/master/kento_banloseteam.sp#L25-L39
I approve
Also cs_intermission does not have a userid, you will need to loop through all the clients and kick/ban them like that.
rogeraabbccdd
07-28-2016, 04:39
https://github.com/rogeraabbccdd/CSGO-BanLoseTeam/blob/master/kento_banloseteam.sp#L25-L39
I approve
Also cs_intermission does not have a userid, you will need to loop through all the clients and kick/ban them like that.
How do I loop through all the clients?
Will this work?
for(new i = 1; i <= MaxClients; i++)
CamerDisco
07-28-2016, 07:36
public OnMatchEnd (Handle:event, const String:name[], bool:dontBroadcast)
{
for(new i = 1; i <= MaxClients; i++)
{
char BLT_MESSEGE[100];
Format(BLT_MESSEGE, sizeof(BLT_MESSEGE), "%T", "Kick Messege");
char BLT_REASON[100];
Format(BLT_REASON, sizeof(BLT_REASON), "%T", "Ban Reason");
//TR WIN
if (CS_GetTeamScore(TR) == BLT_ROUND)
{
//Kick CT
if (GetClientTeam(i) == CT)
{
if ( IsClientConnected(i) && !IsFakeClient(i) )
{
BanClient(i, BLT_TIME, BANFLAG_AUTO, BLT_REASON, BLT_MESSEGE);
PrintToChatAll("%t", "Loser has been kicked.");
}
}
else if (GetClientTeam(i) == TR)
{
return Plugin_Handled;
}
}
//CT WIN
else if (CS_GetTeamScore(CT) == BLT_ROUND)
{
//Kick TR
if (GetClientTeam(i) == TR)
{
if ( IsClientConnected(i) && !IsFakeClient(i) )
{
BanClient(i, BLT_TIME, BANFLAG_AUTO, BLT_REASON, BLT_MESSEGE);
PrintToChatAll("%t", "Loser has been kicked.");
}
}
else if (GetClientTeam(i) == CT)
{
return Plugin_Handled;
}
}
}
return Plugin_Handled;
}
rogeraabbccdd
07-28-2016, 11:51
public OnMatchEnd (Handle:event, const String:name[], bool:dontBroadcast)
for(new i = 1; i <= MaxClients; i++)
Thanks for your help!
I have added you to credit.
CamerDisco
07-28-2016, 12:51
You don't have fixed version on github :D
rogeraabbccdd
07-28-2016, 20:11
I remember I do that and go to sleep last night...
Maybe I was so tired.
I'll update it later.
rogeraabbccdd
07-29-2016, 09:00
Updated
Cant test right now but...
Does this plugin have immunity flags?
Does this plugin give a message to the banned players? Like You have been banned for 30 minutes for losing the match?
rogeraabbccdd
08-01-2016, 05:15
No immunity flag, I can add it.
This plugin will give player a message.
Yes ofcourse add a immunity option.
Thanks for the work really wanted this plugin.
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.