Raised This Month: $ Target: $400
 0% 

Chat Manager [Admin Prefix & Color Chat]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 03-10-2022 , 17:19   Re: Chat Manager [Admin Prefix & Color Chat]
Reply With Quote #11

I tested this plugin and liked it but I have comment and suggest:

The comment:
PHP Code:
CheckAccountsid )
{
    new 
szPasswordMAX_PASSWORD_LENGTH ];

    
get_user_infoid"_pw"szPasswordcharsmaxszPassword ) );
        
    if( 
TrieGetArrayg_tDatabaseg_iPlayerid ][ AuthID ], eDatasizeof eData ) || TrieGetArrayg_tDatabaseg_iPlayerid ][ Name ], eDatasizeof eData ) || TrieGetArrayg_tDatabaseg_iPlayerid ][ IP ], eDatasizeof eData ))
    {
        if( ( 
eDataPlayer_Password ][ ] && equaleDataPlayer_Password ], szPassword ) ) || !eDataPlayer_Password ][ ] )
        {
            if( 
eDataPlayer_Prefix ][ ] )
            {
                
cm_set_user_prefixideDataPlayer_Prefix ] )
            }
            
            if( 
eDataPlayer_Flags ][ ] )
            {
                
remove_user_flagsid );
                
set_user_flagsidread_flagseDataPlayer_Flags ] ) );
            }
            
            if( 
eDataPlayer_VIPFlags ][ ] )
            {
                
g_iPlayerid ][ VIP ] |= read_flagseDataPlayer_VIPFlags ] );
            }
        }
        
        else if( 
eDataPlayer_Password ][ ] && ! equaleDataPlayer_Password ], szPassword ) )
        {
            
server_cmd"kick #%d ^"You have no entry to this server^""get_user_useridid ) );   
        }
    }

As you can see I want to create a custom prefix from another file, This native "cm_set_user_prefix" work like replace the old prefix to the new one, So if I don't put anything in the 'Custom Prefix' or 'Admin Prefix' etc section of the 'ChatManager.ini' file, the prefix will not appear but the colorful chat will appear.

PHP Code:
funcUpdateData(id)
//g_ePlayerData[id][PDATA_PREFIX][0] = EOS // Disable this line 
The suggest:
I suggest you to add swear filter or anti swearing etc.:
PHP Code:
for( new szSwearMAX_FMT_LENGTH ], iPosiArraySizeg_aSwearFilter ); i++ )
        {
            
ArrayGetStringg_aSwearFilteriszSwearcharsmaxszSwear ) );
            
            if( ( 
iPos containiszArgsszSwear ) ) != -
            {
                new 
iLen strlenszSwear )
                while( 
iLen-- )
                {
                    
szArgsiPos++ ] = '*';  
                }
            }
        } 
Edit: Clear data when the client is disconnected, clear the prefix variable only when the client is connected and disconnected or create a custom variable for the prefix native
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 03-21-2022 at 18:11.
Supremache is offline
 



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


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