This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[DELETED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shadowless
Member
Join Date: May 2018
Old 05-05-2019 , 21:57   [DELETED]
Reply With Quote #1

---

Last edited by Shadowless; 05-19-2019 at 05:40.
Shadowless is offline
Send a message via ICQ to Shadowless
4ever16
Veteran Member
Join Date: Apr 2015
Old 05-06-2019 , 00:54   Re: InfoConnects by PAffAEJIkA
Reply With Quote #2

Try this.

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

new hNvaultconnectsgMaxconnect[33]; 
#define TASK 92512 

public plugin_init(){ 
    
register_plugin("InfoConnects""1.0""PAffAEJIkA :3"); 
    
nvOpen();   
     
    
connects nvault_get(hNvault"CONNECTS"); 
     
    new 
szDate[16], szData[16];    get_time("%H:%M"szDatecharsmax(szDate)); 
    
strtok(szDateszDatecharsmax(szDate), szDatacharsmax(szData), ':'); 
    if(
str_to_num(szDate) == 23){ 
        new 
szTime = (60 str_to_num(szData)) * 60;   
        
set_task(float(szTime), "changeVault"TASK); 
    } 
     
    
gMax get_maxplayers(); 
    
register_logevent("round_start"2"1=Round_Start"); 


public 
client_putinserver(id){ 
    if(
is_user_bot(id) || is_user_hltv(id))   
        return; 
     
    new 
szSteam[35];   
    
get_user_authid(idszSteamcharsmax(szSteam)); 
    
connect[id] = nvault_get(hNvaultszSteam); 
     
    if(!
connect[id]){ 
        
connects ++; 
         
        new 
string[8];   
        
formatex(stringcharsmax(string), "%d"connects); 
        
nvault_set(hNvault"CONNECTS"string); 
         
        
nvault_set(hNvaultszSteam"1"); 
    } 
    
client_print_color(00"^3[^4TDAY^3] Players Online:^4 %d/%d^3. Total Today^4 %d^3 Player(s)!"get_playersnum(), gMaxconnects);     
    

    

public 
nvOpen(){ 
    new 
szDate[3];   
    
get_time("%d"szDatecharsmax(szDate)); 
     
    new 
szVName[64];   
    
formatex(szVNamecharsmax(szVName), "CONNECTS%d"str_to_num(szDate)); 
     
    
hNvault nvault_open(szVName); 
    if(
hNvault == INVALID_HANDLE)   
        
set_fail_state("Fail open NVAULT file!"); 
     
    new 
szFile[128];   
    
formatex(szFilecharsmax(szFile), "addons/amxmodx/data/vault/CONNECTS%d.vault"str_to_num(szDate) - 2); 
     
    if(
file_exists(szFile))   
        
delete_file(szFile); 


public 
changeVault(){ 
    new 
players[32];   
    
get_players(playersconnects"ch"); 
     
    
nvault_close(hNvault);       
    
nvOpen(); 

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE 
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par } 
*/ 
4ever16 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-06-2019 , 09:00   Re: InfoConnects by PAffAEJIkA
Reply With Quote #3

Simply remove this line:

PHP Code:
register_logevent("round_start"2"1=Round_Start"); 
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 05-06-2019, 09:36
Shadowless
This message has been deleted by Shadowless.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-06-2019 , 14:47   Re: InfoConnects by PAffAEJIkA
Reply With Quote #4

You can test it instead of asking. What can go so much wrong when removing one line?
__________________

Last edited by OciXCrom; 05-06-2019 at 14:48.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 16:26.


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