Raised This Month: $ Target: $400
 0% 

Client_print not works


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 11-11-2011 , 13:30   Client_print not works
Reply With Quote #1

Look the code:

PHP Code:
#include <amxmodx> 
#include <celltrie> 

new g_pReconnectTime
new 
Trie:g_tSteamID
new 
g_szSteamID33 ][ 33 ]; 

public 
plugin_init() 

    
g_pReconnectTime register_cvar"amx_noretrytime" "30" )
    
register_cvar("amx_retry""0"FCVAR_SERVER)
    
g_tSteamID TrieCreate(); 


public 
plugin_end() 

    
TrieDestroyg_tSteamID ); 


public 
client_authorized(id
{         
    new 
iTime iSysTime
    
get_user_authidid g_szSteamIDid ] , charsmaxg_szSteamID[] ) ); 
    
    if ( 
get_pcvar_numg_pReconnectTime ) && TrieGetCellg_tSteamID g_szSteamIDid ] , iTime ) ) 
    { 
        if ( 
iTime > ( iSysTime get_systime() ) ) 
        { 
            new 
szMsg64 ]; 
            
formatexszMsg charsmaxszMsg ) , "Sem Retry. Aguarde %d segundos!" , ( iTime iSysTime ) ); 
            
            
message_beginMSG_ONE SVC_DISCONNECT _id ); 
            
write_stringszMsg ); 
            
message_end(); 
        } 
        else 
        { 
            
TrieDeleteKeyg_tSteamID g_szSteamIDid ] ); 
        } 
    } 


public 
client_disconnect(id
{                   
    if(
get_cvar_num("amx_dsban") <= 0
        return
        
    new 
Sid[32], Name[32]
    
get_user_name(idName31)
    
get_user_authid(idSid31)
        
    new 
iTimeVal get_pcvar_numg_pReconnectTime ); 
    if ( 
iTimeVal && !( get_user_flagsid ) & ADMIN_IMMUNITY ) ) 
    {        
        
TrieSetCellg_tSteamID g_szSteamIDid ] , get_systime() + iTimeVal ); 
        
client_print(0print_chat"O jogador %s desconectou-se [%s]"NameSid)
    } 

__________________

Last edited by kramesa; 11-11-2011 at 13:31.
kramesa is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 11-11-2011 , 13:47   Re: Client_print not works
Reply With Quote #2

PHP Code:
public client_disconnect(id
If a user is disconnected, he cannot receive a message anymore. from the server because he lost contact with the server from then on.
__________________

Last edited by Napoleon_be; 11-11-2011 at 13:47.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 11-11-2011 , 14:05   Re: Client_print not works
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
PHP Code:
public client_disconnect(id
If a user is disconnected, he cannot receive a message anymore. from the server because he lost contact with the server from then on.
Lol, her the print_chat works:

PHP Code:
public client_disconnect(id
{
    new 
Name[32], Sid[32]
    
    if(
get_cvar_num("amx_dsban") <= 0)
        return
    
    if(
get_user_flags(id) & ADMIN_IMMUNITY)
        return
    
    
get_user_name(idName31)
    
get_user_authid(idSid31)
    
    
client_print(0print_chat"%s O jogador '%s' miou e sera banido por 2 horas"pug_headerName)
    
    
server_cmd"amx_addban ^"%s^" ^"%s^" 120 ^"Saiu em uma partida LIVE!^""NameSid)
    

__________________

Last edited by kramesa; 11-11-2011 at 14:05.
kramesa 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 14:17.


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