Raised This Month: $ Target: $400
 0% 

Problem to ban with the last sourceban


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mickael002
Senior Member
Join Date: Jul 2010
Old 05-20-2013 , 17:42   Problem to ban with the last sourceban
Reply With Quote #1

Hello,

I use this plugin : https://forums.alliedmods.net/showthread.php?p=1164669

But the author doesn't reply of my request.

I use the last sourcebans plugin : http://forums.alliedmods.net/showthread.php?t=207840

When a players are disconnect in terrorist the players are automatic banned, but that is doesn't works.

That is the code for that in deathrun_manager.sp

PHP Code:
public OnAllPluginsLoaded()
    if (
LibraryExists("sourcebans"))
        
g_bSBAvailable true;

public 
OnLibraryAdded(const String:name[])
    if (
StrEqual(name"sourcebans"))
        
g_bSBAvailable true;

public 
OnLibraryRemoved(const String:name[])
    if (
StrEqual(name"sourcebans"))
        
g_bSBAvailable false;




public 
Action:PlayerDisconnect_Event(Handle:event, const String:name[], bool:dontBroadcast) {
    if (!
GetConVarBool(_active) || !GetConVarBool(_tb))
        return 
Plugin_Continue;
    
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
    if (!
client)
        return 
Plugin_Continue;
    
    if (
IsClientInGame(client)) {
        if (
GetClientTeam(client) == CS_TEAM_T) {
            if (
GetTeamClientCount(CS_TEAM_CT) > 2) {
                
decl String:reason[128], String:steamid[64], String:cname[32];
                
GetEventString(event"reason"reasonsizeof(reason));
                if (
StrEqual(reason"Disconnect by user."false)) {
                    
GetEventString(event"networkid"steamidsizeof(steamid));
                    if(!
GetClientName(clientcnamesizeof(cname)))
                        
Format(cnamesizeof(cname), "Unconnected");
                    
                    if (
g_bSBAvailable)
                        
SBBanPlayer(0clientGetConVarInt(_bt), "Deathrun: Disconnected by terrorist");
                    else
                        
BanClient(clientGetConVarInt(_bt), BANFLAG_AUTHID"DEATHRUN: Terrorist can't disconnect""DEATHRUN: Terrorist can't disconnect");
                    
PrintToChatAll("\x04%t \x01>\x03 %t""deathrun""terr disconnected"cnameGetConVarInt(_bt));
                }
            }
            
PrintToChatAll("\x04%t \x01>\x03 %t""deathrun""selecting random terrorist");
            
CreateTimer(2.0select_rt);
        }
    }
    
    
    return 
Plugin_Continue;

Error :
PHP Code:
L 05/20/2013 20:17:38: [SMNative "SBBanPlayer" reported
L 05/20/2013 20:17:38: [SMDisplaying call stack trace for plugin "deathrun_manager.smx":
L 05/20/2013 20:17:38: [SM]   [0]  Line 161deathrun_manager.sp::PlayerDisconnect_Event() 
Can you help me for fix that ?

thanks

Last edited by mickael002; 05-20-2013 at 17:47.
mickael002 is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 05-21-2013 , 07:31   Re: Problem to ban with the last sourceban
Reply With Quote #2

The 1.5.0 plugin doesn't have SBBanPlayer anymore, it will work with just BanClient.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
mickael002
Senior Member
Join Date: Jul 2010
Old 05-21-2013 , 07:36   Re: Problem to ban with the last sourceban
Reply With Quote #3

Ok,

I stop using the sourceban 1.5

And i found a big problem with sourceban 1.5.0

When a players is banned, we can't deban him. (Deban in website but not in game) I have try restart server ,change map ... but the ban continu.
mickael002 is offline
Reply



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:52.


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