|
BANNED
|
10-21-2014
, 18:15
Re: Show SMAC BAN to non admins
|
#23
|
Wait.. Tony, I do not know you're talking about, but this works fine for me..
What is the problem?
Quote:
// native SMAC_Ban(client, const String:reason[], any:...);
public Native_Ban(Handle:plugin, numParams)
{
decl String:sVersion[16], String:sReason[256];
new client = GetNativeCell(1);
new duration = GetConVarInt(g_hCvarBanDuration);
GetPluginInfo(plugin, PlInfo_Version, sVersion, sizeof(sVersion));
FormatNativeString(0, 2, 3, sizeof(sReason), _, sReason);
Format(sReason, sizeof(sReason), "SMAC %s: %s", sVersion, sReason);
if (SOURCEBANS_AVAILABLE())
{
SBBanPlayer(0, client, duration, sReason);
ServerCommand("sm_banip #%d %s \"%s\"", GetClientUserId(client), duration, sReason);
PrintToChatAll("\x04[SMAC] \x01Player \x03%N \x01has been banned for a cheating infraction.", client);
}
else
{
decl String:sKickMsg[256];
FormatEx(sKickMsg, sizeof(sKickMsg), "%T", "SMAC_Banned", client);
BanClient(client, duration, BANFLAG_AUTO, sReason, sKickMsg, "SMAC");
ServerCommand("sm_banip #%d %s \"%s\"", GetClientUserId(client), duration, sReason);
PrintToChatAll("\x04[SMAC] \x01Player \x03%N \x01has been banned for a cheating infraction.", client);
}
KickClient(client, sReason);
}
|
Last edited by Sdg; 10-21-2014 at 18:19.
|
|
|
|