Raised This Month: $ Target: $400
 0% 

[NeedHelp]GHW_cronic connect


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-30-2009 , 23:35   Re: [NeedHelp]GHW_cronic connect
Reply With Quote #6

*[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_openVAULT_NAME );
}

public 
plugin_end()
{
    
nvault_closeg_iVault );
}

public 
client_connectid )
{
    static 
szNum]; 
    
num_to_strnvault_getg_iVault VAULT_KEY ) + szNum );
    
nvault_setg_iVault VAULT_KEY szNum );
    
    
client_printprint_chat "* Player # %s as just connected to the server." szNum );

__________________

Last edited by Bugsy; 08-31-2009 at 09:22.
Bugsy 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 15:13.


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