*[AMXX] FriTTe has connected from Sweden. [Connections: 1]*
Edit: I reviewed your original post and it looks like you may want the # of times each player has been to the server. Is this true? I can edit the code for this if yes. Or perhaps this code is correct but you want the players name added to the chat print.
Not sure if this is what you're looking for. You did not specify when\if you want the count to reset so this will continue to count even if the server is shutdown\restarted.
PHP Code:
#include <amxmodx>
#include <nvault>
#define VAULT_NAME "CONNECTIONS"
#define VAULT_KEY "NUM"
new g_iVault;
public plugin_init()
{
register_plugin( "Connection Counter" , "1.0" , "bugsy" );
g_iVault = nvault_open( VAULT_NAME );
}
public plugin_end()
{
nvault_close( g_iVault );
}
public client_connect( id )
{
static szNum[ 8 ];
num_to_str( nvault_get( g_iVault , VAULT_KEY ) + 1 , szNum , 7 );
nvault_set( g_iVault , VAULT_KEY , szNum );
client_print( 0 , print_chat , "* Player # %s as just connected to the server." , szNum );
}
__________________