Quote:
Originally Posted by XSlayer
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_iPlayerName[ 33 ][ 32 ]
public client_authorized( id )
{
get_user_name( id , g_iPlayerName[ id ] , charsmax( g_iPlayerName[ ] ) );
}
public LoadString( Client )
{
new szName[ 32 ]
get_user_name( Client, szName, charsmax(szName));
if(equal(g_iPlayerName[ Client ], szName ))
{
client_print( Client, print_chat, "%s entered the game", g_iPlayerName[ Client ] );
}
}
PHP Code:
public LoadString( Client )
{
new szName[ 32 ]
get_user_name( Client, szName, charsmax(szName));
if( !bNameChanged )
{
client_print( Client, print_chat, "%s entered the game", szName );
}
}
public client_infochanged(id)
{
static szNewName[32], szOldName[32]
get_user_info(id, "name", szNewName, charsmax(szNewName))
get_user_name(id, szOldName, charsmax(szOldName))
if(!equal(szNewName, szOldName))
{
bNameChanged = true;
}
else
{
bNameChanged = false;
}
}
__________________