AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   SourceMod Anti-Cheat (https://forums.alliedmods.net/forumdisplay.php?f=133)
-   -   Show bans (https://forums.alliedmods.net/showthread.php?t=249238)

Sdg 10-02-2014 21:07

Show bans
 
Hello People!

How should I put the code correctly so that when the smac running a ban, is also displayed on the server to the players (not admins) ?

ej:

smac_eyetest.sp

Code:

    if (GetClientAuthString(client, sAuthID, sizeof(sAuthID), false) && !StrEqual(sAuthID, "BOT") && SMAC_CheatDetected(client, Detection_Eyeangles, info) == Plugin_Continue)
    {
        SMAC_PrintAdminNotice("%t", "SMAC_EyetestDetected", client);
       
        if (GetConVarBool(g_hCvarBan))
        {
            SMAC_LogAction(client, "was banned for cheating with their eye angles. Eye Angles: %.0f %.0f %.0f", angles[0], angles[1], angles[2]);
            SMAC_Ban(client, "Eye Test Violation");
        }
        else
        {
            SMAC_LogAction(client, "is suspected of cheating with their eye angles. Eye Angles: %.0f %.0f %.0f", angles[0], angles[1], angles[2]);
        }
    }


GoD-Tony 10-03-2014 02:05

Re: Show SMAC BAN to non admins
 
Quote:

Originally Posted by SMAC Wiki
smac_admin_notices - Decides which players will receive admin notices from SMAC. The default is Admin_Generic (b flag).

For more information on admin overrides, check here.

See the example of "sm_chat" and replace it with "smac_admin_notices". This will print admin notices to all players in the server.

Ade 10-03-2014 02:54

Re: Show SMAC BAN to non admins
 
why u want that :D this will allow them to test their hax with alternate accounts

Sdg 10-03-2014 09:40

Re: Show SMAC BAN to non admins
 
Quote:

Originally Posted by GoD-Tony (Post 2206378)
See the example of "sm_chat" and replace it with "smac_admin_notices". This will print admin notices to all players in the server.

Ok, I see .. but;

Code:

Unknown command "smac_admin_notices"
I'm using the version 0.8.6.0

Maybe that command works in any previous version?

GoD-Tony 10-03-2014 09:53

Re: Show SMAC BAN to non admins
 
Quote:

Originally Posted by Sdg (Post 2206481)
Ok, I see .. but;

Code:

Unknown command "smac_admin_notices"
I'm using the version 0.8.6.0

Maybe that command works in any previous version?

It's not a command, check the wiki link in the post above. You have to edit admin_overrides.cfg.

Sdg 10-03-2014 09:56

Re: Show SMAC BAN to non admins
 
Quote:

Originally Posted by GoD-Tony (Post 2206487)
It's not a command, check the wiki link in the post above. You have to edit admin_overrides.cfg.

OK, i put ;

Code:

"smac_admin_notices" ""
I'll try it, thanks GoD-Tony

Sdg 10-03-2014 09:59

Re: Show SMAC BAN to non admins
 
One more question please, the smac only bans the steam id, that way I can get the id and ban the user ip?

Sdg 10-07-2014 18:15

Re: Show SMAC BAN to non admins
 
Someone could tell me how to make the smac ban the user id and ip?

allienaded 10-08-2014 20:09

Re: Show SMAC BAN to non admins
 
Quote:

Originally Posted by Sdg (Post 2208452)
Someone could tell me how to make the smac ban the user id and ip?

Not possible without editing the SMAC code and recompiling from source. Why would you even want to do this IP bans are very easy to circumvent (most people just have to restart their router to get a new IP) and IP bans have the potential to affect someone else who just happened to be assigned the same IP that someone got banned (has happened to me).

Sdg 10-09-2014 09:48

Re: Show SMAC BAN to non admins
 
Quote:

Originally Posted by allienaded (Post 2208813)
(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);
}



All times are GMT -4. The time now is 02:42.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.