Thread: Show bans
View Single Post
Sdg
BANNED
Join Date: Mar 2014
Old 10-09-2014 , 09:48   Re: Show SMAC BAN to non admins
Reply With Quote #10

Quote:
Originally Posted by allienaded View Post
(most people just have to restart their router to get a new IP).
Yes I know, but many others have fixed ip.

Maybe I just need to edit here?

smac.sp

Code:
// 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);
    }
    else
    {
        decl String:sKickMsg[256];
        FormatEx(sKickMsg, sizeof(sKickMsg), "%T", "SMAC_Banned", client);
        BanClient(client, duration, BANFLAG_AUTO, sReason, sKickMsg, "SMAC");
    }
    
    KickClient(client, sReason);
}

Last edited by Sdg; 10-09-2014 at 09:48.
Sdg is offline