Raised This Month: $ Target: $400
 0% 

Help me to find the plugin, please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 06-21-2013 , 15:23   Help me to find the plugin, please
Reply With Quote #1

Hello!
I look for the last seen time plugin, which uses nvault store.
When client connect, a chat announce will be displayed: Hello, %s, your last connect: 11.12.2012 (example)
__________________
sorry my bad english...
alonelive is offline
bat
Veteran Member
Join Date: Jul 2012
Old 06-22-2013 , 04:18   Re: Help me to find the plugin, please
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=204066 Look this, and delete admin user
__________________

Last edited by bat; 06-22-2013 at 04:18.
bat is offline
Send a message via Skype™ to bat
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 06-22-2013 , 04:20   Re: Help me to find the plugin, please
Reply With Quote #3

This isn't he wants, this plugin doesn't use NVault.
__________________
Kia is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-22-2013 , 05:04   Re: Help me to find the plugin, please
Reply With Quote #4

Try this :

PHP Code:
#include < amxmodx >
#include < nvault >

#pragma semicolon 1

#define PLUGIN "Last Connect Welcome Msg"
#define VERSION "0.0.1"

new const DATE_FORMAT[] = "%Y-%m-%d";
const 
MAX_DATE_LENGTH 16;

new 
g_iVault;
new 
g_szCurDate[MAX_DATE_LENGTH];

public 
plugin_init()
{
    
register_pluginPLUGINVERSION"ConnorMcLeod" );

    
g_iVault nvault_open("last_seen_time");
    
get_time(DATE_FORMATg_szCurDatecharsmax(g_szCurDate));
}

public 
plugin_end()
{
    
nvault_close(g_iVault);
}

GETPLAYERAUTHID(idbGet false)
{
    static 
szAuthid[33][32];
    if( 
bGet )
    {
        
get_user_authid(idszAuthid[id], charsmax(szAuthid[]));
    }
    return 
szAuthid[id];
}

public 
client_authorized(id)
{
    
GETPLAYERAUTHID(idtrue);
}

public 
client_putinserver(id)
{
    
remove_task(id);
    if( !
is_user_bot(id) && !is_user_hltv(id) )
    {
        
set_task(2.0"Task_Welcome_Msg"id);
    }
}

public 
Task_Welcome_Msg(id)
{
    if( 
is_user_connected(id) )
    {
        new 
szDate[MAX_DATE_LENGTH];
        
nvault_get(g_iVaultGETPLAYERAUTHID(id), szDatecharsmax(szDate));

        if( !
equal(szDateg_szCurDate) )
        {
            
nvault_set(g_iVaultGETPLAYERAUTHID(id), g_szCurDate);
        }

        new 
szName[32];
        
get_user_name(idszNamecharsmax(szName));

        
set_hudmessage(01001800.05, .channel=-1);
        
show_hudmessage(0"Welcome back %s - last connection %s"szNameszDate);
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-22-2013 at 05:05.
ConnorMcLeod is offline
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 06-22-2013 , 05:17   Re: Help me to find the plugin, please
Reply With Quote #5

Thank you!
__________________
sorry my bad english...
alonelive is offline
WhyThis
Senior Member
Join Date: May 2013
Old 06-22-2013 , 09:10   Re: Help me to find the plugin, please
Reply With Quote #6

thanks i like it
WhyThis is offline
Reply



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 20:10.


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