Raised This Month: $12 Target: $400
 3% 

Show bans


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sdg
BANNED
Join Date: Mar 2014
Old 10-02-2014 , 21:07   Show bans
Reply With Quote #1

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]);
        }
    }

Last edited by Sdg; 04-21-2015 at 16:01.
Sdg is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 10-03-2014 , 02:05   Re: Show SMAC BAN to non admins
Reply With Quote #2

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.
__________________

Last edited by GoD-Tony; 10-03-2014 at 02:06.
GoD-Tony is offline
Ade
I love purple
Join Date: May 2010
Old 10-03-2014 , 02:54   Re: Show SMAC BAN to non admins
Reply With Quote #3

why u want that this will allow them to test their hax with alternate accounts
__________________
Ade is offline
Sdg
BANNED
Join Date: Mar 2014
Old 10-03-2014 , 09:40   Re: Show SMAC BAN to non admins
Reply With Quote #4

Quote:
Originally Posted by GoD-Tony View Post
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?
Sdg is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 10-03-2014 , 09:53   Re: Show SMAC BAN to non admins
Reply With Quote #5

Quote:
Originally Posted by Sdg View Post
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.
__________________
GoD-Tony is offline
Sdg
BANNED
Join Date: Mar 2014
Old 10-03-2014 , 09:56   Re: Show SMAC BAN to non admins
Reply With Quote #6

Quote:
Originally Posted by GoD-Tony View Post
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

Last edited by Sdg; 10-03-2014 at 09:59.
Sdg is offline
Sdg
BANNED
Join Date: Mar 2014
Old 10-03-2014 , 09:59   Re: Show SMAC BAN to non admins
Reply With Quote #7

One more question please, the smac only bans the steam id, that way I can get the id and ban the user ip?
Sdg is offline
Sdg
BANNED
Join Date: Mar 2014
Old 10-07-2014 , 18:15   Re: Show SMAC BAN to non admins
Reply With Quote #8

Someone could tell me how to make the smac ban the user id and ip?
Sdg is offline
allienaded
AlliedModders Donor
Join Date: Feb 2013
Old 10-08-2014 , 20:09   Re: Show SMAC BAN to non admins
Reply With Quote #9

Quote:
Originally Posted by Sdg View Post
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).
allienaded is offline
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
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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