View Single Post
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 12-11-2021 , 19:42   Re: Save String Array
Reply With Quote #4

Quote:
Originally Posted by XSlayer View Post
is use the name for only a string example, but the string that i want to save is a class i cannot use the steam id
Edit: i don't understand what you are talking about but what i understand is you want to check if the player has the same nickname that has owned when joined the server.
PHP Code:
new g_iPlayerName33 ][ 32 ]
public 
client_authorizedid )
{
    
get_user_nameid g_iPlayerNameid ] , charsmaxg_iPlayerName[ ] ) );
}

public 
LoadStringClient )
{
    new 
szName32 ]
    
get_user_nameClientszNamecharsmax(szName));
    if(
equal(g_iPlayerNameClient ], szName ))
    {
        
client_printClientprint_chat"%s entered the game"g_iPlayerNameClient ] );
    }

PHP Code:
public LoadStringClient )
{
    new 
szName32 ]
    
get_user_nameClientszNamecharsmax(szName));
    
    if( !
bNameChanged )
    {
        
client_printClientprint_chat"%s entered the game"szName );
    }
}


public 
client_infochanged(id)
{
    static 
szNewName[32], szOldName[32]
    
get_user_info(id"name"szNewNamecharsmax(szNewName))
    
get_user_name(idszOldNamecharsmax(szOldName))
    
    if(!
equal(szNewNameszOldName))
    {
        
bNameChanged true;
    }
    else
    {
        
bNameChanged false;
    }

__________________
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; 12-11-2021 at 20:11.
Supremache is offline