 |
|
Veteran Member
Join Date: Oct 2011
Location: Your mind.
|

09-14-2013
, 07:34
Re: Handle disconected
|
#4
|
Quote:
Originally Posted by Backstabnoob
You can easily do something like this:
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"
new Trie: g_tPlayersLastConnection
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
g_tPlayersLastConnection = TrieCreate( )
}
public client_disconnect( id )
{
new szAuthid[ 34 ]
get_user_authid( id, szAuthid, charsmax( szAuthid ) )
TrieSetCell( g_tPlayersLastConnection, szAuthid, get_systime( ) )
}
public client_putinserver( id )
{
new szAuthid[ 34 ]
get_user_authid( id, szAuthid, charsmax( szAuthid ) )
if( !TrieKeyExists( g_tPlayersLastConnection, szAuthid ) )
return
new iTime
TrieGetCell( g_tPlayersLastConnection, szAuthid, iTime )
if( get_systime( ) - iTime <= 300 )
{
// player has reconnected within 5 minutes
}
}
|
How can I do something with his steamid if he does not connect again?
__________________
|
|
|
|