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

Show bans


Post New Thread Reply   
 
Thread Tools Display Modes
Sdg
BANNED
Join Date: Mar 2014
Old 10-22-2014 , 18:26   Re: Show SMAC BAN to non admins
Reply With Quote #31

Ban ip and id works fine, but printochatall donsn't appear..

Last edited by Sdg; 04-21-2015 at 15:58.
Sdg is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 10-23-2014 , 06:01   Re: Show SMAC BAN to non admins
Reply With Quote #32

Quote:
Originally Posted by Sdg View Post
Ban ip and id works fine, but printochatall donsn't appear..
Move PrintToChatAll above the BanClient lines.
__________________

Last edited by GoD-Tony; 10-23-2014 at 06:01.
GoD-Tony is offline
Sdg
BANNED
Join Date: Mar 2014
Old 10-23-2014 , 12:56   Re: Show SMAC BAN to non admins
Reply With Quote #33

L 10/23/2014 - 13:50:49: SourceMod error session started
L 10/23/2014 - 13:50:49: Info (map "de_inferno_classic") (file "errors_20141023.log")
L 10/23/2014 - 13:50:49: [SM] Native "KickClient" reported: Client 1 is not connected
L 10/23/2014 - 13:50:49: [SM] Displaying call stack trace for plugin "smac.smx":
L 10/23/2014 - 13:50:49: [SM] [0] Line 349, C:\cs\css\addons\sourcemod\scripting\smac.sp: :Native_Ban()
L 10/23/2014 - 13:50:49: [SM] Native "SMAC_Ban" reported: Error encountered while processing a dynamic native
L 10/23/2014 - 13:50:49: [SM] Displaying call stack trace for plugin "smac_eyetest.smx":
L 10/23/2014 - 13:50:49: [SM] [0] Line 422, C:\cs\css\addons\sourcemod\scripting\smac_eye test.sp::OnPlayerRunCmd()
L 10/23/2014 - 13:50:49: [SM] Native "IsPlayerAlive" reported: Client 1 is not in game
L 10/23/2014 - 13:50:49: [SM] Displaying call stack trace for plugin "smac_speedhack.smx":
L 10/23/2014 - 13:50:49: [SM] [0] Line 126, C:\cs\css\addons\sourcemod\scripting\smac_spe edhack.sp::OnPlayerRunCmd()
Sdg is offline
FallenNT
Member
Join Date: Feb 2013
Location: Russia
Old 10-24-2014 , 10:11   Re: Show SMAC BAN to non admins
Reply With Quote #34

I have too most
Code:
L 10/24/2014 - 19:34:22: [SM] Native "KickClient" reported: Client 18 is not connected
L 10/24/2014 - 19:34:22: [SM] Displaying call stack trace for plugin "smac.smx":
L 10/24/2014 - 19:34:22: [SM]   [0]  Line 349, smac.sp::Native_Ban()
L 10/24/2014 - 19:34:22: [SM] Native "SMAC_Ban" reported: Error encountered while processing a dynamic native
L 10/24/2014 - 19:34:22: [SM] Displaying call stack trace for plugin "smac_eyetest.smx":
L 10/24/2014 - 19:34:22: [SM]   [0]  Line 422, smac_eyetest.sp::OnPlayerRunCmd()
L 10/24/2014 - 19:34:22: [SM] Native "IsPlayerAlive" reported: Client 18 is not in game
L 10/24/2014 - 19:34:22: [SM] Displaying call stack trace for plugin "smac_speedhack.smx":
L 10/24/2014 - 19:34:22: [SM]   [0]  Line 126, smac_speedhack.sp::OnPlayerRunCmd()
FallenNT is offline
Send a message via ICQ to FallenNT
nomy
Senior Member
Join Date: Dec 2009
Location: United Kingdom
Old 10-24-2014 , 15:47   Re: Show SMAC BAN to non admins
Reply With Quote #35

I don't think there is a OnKickClient forward.
nomy is offline
FallenNT
Member
Join Date: Feb 2013
Location: Russia
Old 01-11-2015 , 04:49   Re: Show SMAC BAN to non admins
Reply With Quote #36

Code:
L 01/11/2015 - 00:14:42: [SM] Native "KickClient" reported: Client 1 is not connected
L 01/11/2015 - 00:14:42: [SM] Displaying call stack trace for plugin "smac.smx":
L 01/11/2015 - 00:14:42: [SM]   [0]  Line 349, smac.sp::Native_Ban()
L 01/11/2015 - 00:14:42: [SM] Native "SMAC_Ban" reported: Error encountered while processing a dynamic native
L 01/11/2015 - 00:14:42: [SM] Displaying call stack trace for plugin "smac_cvars.smx":
L 01/11/2015 - 00:14:42: [SM]   [0]  Line 736, smac_cvars.sp::CVars_QueryCallback()
Code:
L 01/11/2015 - 01:05:19: [SM] Native "KickClient" reported: Client 26 is not connected
L 01/11/2015 - 01:05:19: [SM] Displaying call stack trace for plugin "smac.smx":
L 01/11/2015 - 01:05:19: [SM]   [0]  Line 349, smac.sp::Native_Ban()
L 01/11/2015 - 01:05:19: [SM] Native "SMAC_Ban" reported: Error encountered while processing a dynamic native
L 01/11/2015 - 01:05:19: [SM] Displaying call stack trace for plugin "smac_eyetest.smx":
L 01/11/2015 - 01:05:19: [SM]   [0]  Line 422, smac_eyetest.sp::OnPlayerRunCmd()
L 01/11/2015 - 01:05:19: [SM] Native "IsPlayerAlive" reported: Client 26 is not in game
L 01/11/2015 - 01:05:19: [SM] Displaying call stack trace for plugin "smac_speedhack.smx":
L 01/11/2015 - 01:05:19: [SM]   [0]  Line 126, smac_speedhack.sp::OnPlayerRunCmd()
L 01/11/2015 - 01:05:19: [SM] Native "IsFakeClient" reported: Client 26 is not connected
L 01/11/2015 - 01:05:19: [SM] Displaying call stack trace for plugin "smac_eyetest.smx":
L 01/11/2015 - 01:05:19: [SM]   [0]  Line 162, smac_eyetest.sp::OnPlayerRunCmd()
L 01/11/2015 - 01:05:19: [SM] Native "IsPlayerAlive" reported: Client 26 is not in game
L 01/11/2015 - 01:05:19: [SM] Displaying call stack trace for plugin "smac_speedhack.smx":
L 01/11/2015 - 01:05:19: [SM]   [0]  Line 126, smac_speedhack.sp::OnPlayerRunCmd()
L 01/11/2015 - 02:35:24: [SM] Native "KickClient" reported: Client 3 is not connected
L 01/11/2015 - 02:35:24: [SM] Displaying call stack trace for plugin "smac.smx":
L 01/11/2015 - 02:35:24: [SM]   [0]  Line 349, smac.sp::Native_Ban()
L 01/11/2015 - 02:35:24: [SM] Native "SMAC_Ban" reported: Error encountered while processing a dynamic native
L 01/11/2015 - 02:35:24: [SM] Displaying call stack trace for plugin "smac_eyetest.smx":
L 01/11/2015 - 02:35:24: [SM]   [0]  Line 422, smac_eyetest.sp::OnPlayerRunCmd()
L 01/11/2015 - 02:35:24: [SM] Native "IsPlayerAlive" reported: Client 3 is not in game
L 01/11/2015 - 02:35:24: [SM] Displaying call stack trace for plugin "smac_speedhack.smx":
L 01/11/2015 - 02:35:24: [SM]   [0]  Line 126, smac_speedhack.sp::OnPlayerRunCmd()

Last edited by FallenNT; 01-11-2015 at 04:52.
FallenNT is offline
Send a message via ICQ to FallenNT
allienaded
AlliedModders Donor
Join Date: Feb 2013
Old 01-11-2015 , 08:47   Re: Show SMAC BAN to non admins
Reply With Quote #37

This is what I use and it works without problems:

smac.sp starting line 327

PHP Code:
// native SMAC_Ban(client, const String:reason[], any:...);
public Native_Ban(Handle:pluginnumParams)
{
    
decl String:sVersion[16], String:sReason[256];
    new 
client GetNativeCell(1);
    new 
duration GetConVarInt(g_hCvarBanDuration);
    
    
GetPluginInfo(pluginPlInfo_VersionsVersionsizeof(sVersion));
    
FormatNativeString(023sizeof(sReason), _sReason);
    
Format(sReasonsizeof(sReason), "SMAC %s: %s"sVersionsReason);
    
    
decl String:sAuthID[MAX_AUTHID_LENGTH];
    if (!
GetClientAuthString(clientsAuthIDsizeof(sAuthID), true))
    {
        if (
GetClientAuthString(clientsAuthIDsizeof(sAuthID), false))
        {
            
Format(sAuthIDsizeof(sAuthID), "%s (Not Validated)"sAuthID);
        }
        else
        {
            
strcopy(sAuthIDsizeof(sAuthID), "Unknown");
        }
    }
    
    
decl String:sIP[17];
    if (!
GetClientIP(clientsIPsizeof(sIP)))
    {
        
strcopy(sIPsizeof(sIP), "Unknown");
    }
    
    if (
SOURCEBANS_AVAILABLE())
    {
        
PrintToChatAll("\x01 \x07[SMAC] %N (ID: %s | IP: %s) has been permanently banned for a cheating infraction."clientsAuthIDsIP);
        
        
SBBanPlayer(0clientdurationsReason);
    }
    else
    {
        
PrintToChatAll("\x01 \x07[SMAC] %N (ID: %s | IP: %s) has been permanently banned for a cheating infraction."clientsAuthIDsIP);
        
        
decl String:sKickMsg[256];
        
FormatEx(sKickMsgsizeof(sKickMsg), "%T""SMAC_Banned"client);
        
BanClient(clientdurationBANFLAG_AUTOsReasonsKickMsg"SMAC");
    }
    
    
KickClient(clientsReason);

allienaded is offline
Sdg
BANNED
Join Date: Mar 2014
Old 01-12-2015 , 09:38   Re: Show SMAC BAN to non admins
Reply With Quote #38

Good, I'm going to test this.

Last edited by Sdg; 04-21-2015 at 16:00.
Sdg is offline
JLmelenchon
Junior Member
Join Date: Mar 2019
Old 05-03-2019 , 05:57   Re: Show SMAC BAN to non admins
Reply With Quote #39

Quote:
Originally Posted by allienaded View Post
This is what I use and it works without problems:

smac.sp starting line 327

PHP Code:
// native SMAC_Ban(client, const String:reason[], any:...);
public Native_Ban(Handle:pluginnumParams)
{
    
decl String:sVersion[16], String:sReason[256];
    new 
client GetNativeCell(1);
    new 
duration GetConVarInt(g_hCvarBanDuration);
    
    
GetPluginInfo(pluginPlInfo_VersionsVersionsizeof(sVersion));
    
FormatNativeString(023sizeof(sReason), _sReason);
    
Format(sReasonsizeof(sReason), "SMAC %s: %s"sVersionsReason);
    
    
decl String:sAuthID[MAX_AUTHID_LENGTH];
    if (!
GetClientAuthString(clientsAuthIDsizeof(sAuthID), true))
    {
        if (
GetClientAuthString(clientsAuthIDsizeof(sAuthID), false))
        {
            
Format(sAuthIDsizeof(sAuthID), "%s (Not Validated)"sAuthID);
        }
        else
        {
            
strcopy(sAuthIDsizeof(sAuthID), "Unknown");
        }
    }
    
    
decl String:sIP[17];
    if (!
GetClientIP(clientsIPsizeof(sIP)))
    {
        
strcopy(sIPsizeof(sIP), "Unknown");
    }
    
    if (
SOURCEBANS_AVAILABLE())
    {
        
PrintToChatAll("\x01 \x07[SMAC] %N (ID: %s | IP: %s) has been permanently banned for a cheating infraction."clientsAuthIDsIP);
        
        
SBBanPlayer(0clientdurationsReason);
    }
    else
    {
        
PrintToChatAll("\x01 \x07[SMAC] %N (ID: %s | IP: %s) has been permanently banned for a cheating infraction."clientsAuthIDsIP);
        
        
decl String:sKickMsg[256];
        
FormatEx(sKickMsgsizeof(sKickMsg), "%T""SMAC_Banned"client);
        
BanClient(clientdurationBANFLAG_AUTOsReasonsKickMsg"SMAC");
    }
    
    
KickClient(clientsReason);

Do i need to recompile the modification into a new plugin to replace the old one? It doesn't seem to work if i only modify the sp file.
JLmelenchon is offline
Mr.Silence
Junior Member
Join Date: Aug 2012
Old 05-05-2019 , 12:58   Re: Show SMAC BAN to non admins
Reply With Quote #40

Quote:
Originally Posted by JLmelenchon View Post
Do i need to recompile the modification into a new plugin to replace the old one? It doesn't seem to work if i only modify the sp file.
Yes, you'll need to recompile the plugin and replace the old one. The .sp file is just the source file and not the working plugin.
Mr.Silence 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 13:22.


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