Raised This Month: $ Target: $400
 0% 

Get nVault Timestamp


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 05-14-2020 , 14:12   Re: Get nVault Timestamp
Reply With Quote #3

PHP Code:
public plugin_cfg()
{
   
g_Vault nvault_open("Data");
   if(
g_Vault == INVALID_HANDLE)
      
set_fail_state("Error opening nVault");
   
   
nvault_prune(g_Vault,0,get_systime() - ((60 60) * 24));
}

public 
plugin_end()
{
   
nvault_close(g_Vault);
}

public 
something(id)
{
        new 
iTimestamp szVal10 ], AuthID[33]
        
get_user_authid(idAuthIDcharsmax(AuthID))
        if(!
nvault_lookupg_Vault AuthIDszVal charsmaxszVal ) , iTimestamp ))
        {
            
nvault_setg_Vault AuthID"player_data" );
            
//do something
        
}
        else
        {
            
client_print(idprint_team_default"You need to wait %02d hours until execute again!", (get_systime() - iTimestamp) );
            return 
PLUGIN_HANDLED;
        }

__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 05-14-2020 at 14:12.
Shadows Adi 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 17:06.


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