Raised This Month: $ Target: $400
 0% 

Solved Help ban with server_cmd()


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 04-17-2022 , 14:14   Help ban with server_cmd()
Reply With Quote #1

Guys please help, i've tried one milion combinations of codes to write a simple line .

I want to ban a player when he disconnect if he has a boolean true .

Idk what is the problem, i was thinking that he disconnect too soon so the server can't get his authid to banhim , i've scrooled all fucking topics i founded and nothing , the same result .

I added an debug message, wich is called properly . but the player doesn't get ban.

My last attempt was to ban him with addip but nothing works .


PHP Code:
public client_disconnectid )
{
    if( 
cs_get_user_team(id) == CS_TEAM_T )
    {
        
get_user_nameidgLastRetryNamecharsmax(gLastRetryName) );    
        
RetryOn true;

        if( 
BanHim[id] )
        {
            
server_cmd("amx_ban #%d 30 ^"ReasonTERO RETRY TWO TIMES!^""get_user_userid(id) )
            
client_print0print_chat"Jucatorul %s a primit ban 30 de minute pentru retry ca terorist!"gLastRetryName );
        }
    }

Please note that the message "Jucatorul %s.. " ( an debug message) is properly called, but the line where i'm trying to ban the player is simply isn't called .

Thank you . (the amxx version is higher than 1.8.2)

To make it easy for you, everything works only this part:

Code:
server_cmd("amx_ban #%d 30 ^"Reason: TERO RETRY TWO TIMES!^"", get_user_userid(id) )
__________________
Project: Among Us

Last edited by Craxor; 04-18-2022 at 14:23.
Craxor is offline
Send a message via ICQ to Craxor
 


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 21:19.


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