Raised This Month: $ Target: $400
 0% 

Visitor Counter v1.4


Post New Thread Reply   
 
Thread Tools Display Modes
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-14-2019 , 17:46   Re: Visitor Counter v1.2
Reply With Quote #11

Quote:
Originally Posted by DON KHAN 1 View Post
oh k i didn't read it carefully.. well leave it.

here is translation of Russian lang

Code:
[ru]
PEOPLE_VISIT_TODAY_SINGULAR_CHAT = &x04[Счетчик посетителей] &x04%d &x01человек посетил сервер сегодня!
PEOPLE_VISIT_TODAY_PLURAL_CHAT = &x04[Счетчик посетителей] &x04%d &x01люди посетили сервер сегодня!

PEOPLE_VISIT_TODAY_SINGULAR = %d человек посетил сервер сегодня!
PEOPLE_VISIT_TODAY_PLURAL = %d люди посетили сервер сегодня!

YESTERDAY_VISITORS_SINGULAR_CHAT = (&x04%d &x01посетитель)
YESTERDAY_VISITORS_PLURAL_CHAT = (&x04%d &x01посетители)

YESTERDAY_VISITORS_SINGULAR = (%d посетитель)
YESTERDAY_VISITORS_PLURAL = (%d посетители)

STATISTIC_RISE_CHAT = &x01Это показывает рост &x04%.1f%% &x01по сравнению со вчерашним днем
STATISTIC_LOSS_CHAT = &x01Это показывает падение &x04%.1f%% &x01по сравнению со вчерашним днем

STATISTIC_RISE = Это показывает рост %.1f%% по сравнению со вчерашним днем
STATISTIC_LOSS = Это показывает падение %.1f%% по сравнению со вчерашним днем

NO_ACCESS = Нет доступа к этой команде!
can i get credit in translator? cuz it will be my first time that somebody will give me credits
Wait, are you using Google Translate?

Update v1.3
Code:
- Added a check to prevent bots from being logged
- Utilized MAX_AUTHID_LENGTH
- Fixed the same steamid being logged
__________________

Last edited by edon1337; 08-14-2019 at 18:54.
edon1337 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 08-14-2019 , 19:02   Re: Visitor Counter v1.3
Reply With Quote #12

Well done.

Code:
[bp]
PEOPLE_VISIT_TODAY_SINGULAR_CHAT = &x04[Contador de Visitantes] &x04%d &x01pessoa visitou o servidor hoje!
PEOPLE_VISIT_TODAY_PLURAL_CHAT = &x04[Contador de Visitantes] &x04%d &x01pessoas visitaram o servidor hoje!

PEOPLE_VISIT_TODAY_SINGULAR = %d pessoa visitou o servidor hoje!
PEOPLE_VISIT_TODAY_PLURAL = %d pessoas visitaram o servidor hoje!

YESTERDAY_VISITORS_SINGULAR_CHAT = (&x04%d &visitou)
YESTERDAY_VISITORS_PLURAL_CHAT = (&x04%d &visitaram)

YESTERDAY_VISITORS_SINGULAR = (%d visitou)
YESTERDAY_VISITORS_PLURAL = (%d visitaram)

STATISTIC_RISE_CHAT = &x01Isso demonstra um crescimento de &x04%.1f%% &x01comparado a ontem.
STATISTIC_LOSS_CHAT = &x01Isso demonstra uma diminuicao de &x04%.1f%% &x01comparado a ontem.

STATISTIC_RISE = Isso demonstra um crescimento de %.1f%% comparado a ontem.
STATISTIC_LOSS = Isso demonstra uma diminuicao de  %.1f%% comparado a ontem.

NO_ACCESS = Sem acesso ao comando!
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-14-2019 , 19:14   Re: Visitor Counter v1.3
Reply With Quote #13

Quote:
Originally Posted by iceeedr View Post
Well done.

Code:
[bp]
PEOPLE_VISIT_TODAY_SINGULAR_CHAT = &x04[Contador de Visitantes] &x04%d &x01pessoa visitou o servidor hoje!
PEOPLE_VISIT_TODAY_PLURAL_CHAT = &x04[Contador de Visitantes] &x04%d &x01pessoas visitaram o servidor hoje!

PEOPLE_VISIT_TODAY_SINGULAR = %d pessoa visitou o servidor hoje!
PEOPLE_VISIT_TODAY_PLURAL = %d pessoas visitaram o servidor hoje!

YESTERDAY_VISITORS_SINGULAR_CHAT = (&x04%d &visitou)
YESTERDAY_VISITORS_PLURAL_CHAT = (&x04%d &visitaram)

YESTERDAY_VISITORS_SINGULAR = (%d visitou)
YESTERDAY_VISITORS_PLURAL = (%d visitaram)

STATISTIC_RISE_CHAT = &x01Isso demonstra um crescimento de &x04%.1f%% &x01comparado a ontem.
STATISTIC_LOSS_CHAT = &x01Isso demonstra uma diminuicao de &x04%.1f%% &x01comparado a ontem.

STATISTIC_RISE = Isso demonstra um crescimento de %.1f%% comparado a ontem.
STATISTIC_LOSS = Isso demonstra uma diminuicao de  %.1f%% comparado a ontem.

NO_ACCESS = Sem acesso ao comando!
Thank you. Credits added.
__________________
edon1337 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Pakistan
Old 08-14-2019 , 19:36   Re: Visitor Counter v1.3
Reply With Quote #14

@edon1337 Great Work, Love the plugin.

P.S: Official Language Of Pakistan Is Urdu/Hindi.
Both are not supported by AMXX Yet.

Other Languages Spoken there are also not added in AMXX, except English.
__________________
Alber9091 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 08-14-2019 , 23:26   Re: Visitor Counter v1.3
Reply With Quote #15

Wow, about time someone got this done on these forums. Currently running a version with sql. Mine isn't as detailed but gets the job done with a quick search.

http://supercentral.co/levin/playerinfo.php
__________________

Home of the AMX SUPER
Discord
DruGzOG is offline
Send a message via AIM to DruGzOG
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Pakistan
Old 08-15-2019 , 07:21   Re: Visitor Counter v1.3
Reply With Quote #16

Quote:
Originally Posted by DruGzOG View Post
Wow, about time someone got this done on these forums. Currently running a version with sql. Mine isn't as detailed but gets the job done with a quick search.

http://supercentral.co/levin/playerinfo.php
Well I think that's .php script & you are displaying the data on your web by providing ftp information in your .php script. If still its SQL, then, .php script would be much better for such simple outputs, since they are easy to setup & understand than SQL.
__________________
Alber9091 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-15-2019 , 08:49   Re: Visitor Counter v1.3
Reply With Quote #17

@DON KHAN 1 - Since when do 12 year olds from Pakistan speak Romanian and Russian?

PHP Code:
[mk]
PEOPLE_VISIT_TODAY_SINGULAR_CHAT = &x04[Brojach na posetiteli] &x04%&x01chovek go posetil serverot denes!
PEOPLE_VISIT_TODAY_PLURAL_CHAT = &x04[Brojach na posetiteli] &x04%&x01lugje go posetile serverot denes!

PEOPLE_VISIT_TODAY_SINGULAR = %d chovek go posetil serverot denes!
PEOPLE_VISIT_TODAY_PLURAL = %d lugje go posetile serverot denes!

YESTERDAY_VISITORS_SINGULAR_CHAT = (&x04%&x01posetitel)
YESTERDAY_VISITORS_PLURAL_CHAT = (&x04%&x01posetitela)

YESTERDAY_VISITORS_SINGULAR = (%d posetitel)
YESTERDAY_VISITORS_PLURAL = (%d posetitela)

STATISTIC_RISE_CHAT = &x01Statistikata pokazhuva porast od &x04%.1f%% &x01vo sporedba so vchera
STATISTIC_LOSS_CHAT 
= &x01Statistikata pokazhuva pad od &x04%.1f%% &x01vo sporedba so vchera

STATISTIC_RISE 
Statistikata pokazhuva porast od %.1f%% vo sporedba so vchera
STATISTIC_LOSS 
Statistikata pokazhuva pad od %.1f%% vo sporedba so vchera

NO_ACCESS 
Nemash dostap do ovaa komanda!

[
bg]
PEOPLE_VISIT_TODAY_SINGULAR_CHAT = &x04[Broqch za posetiteli] &x04%&x01chovek e posetil servera dnes!
PEOPLE_VISIT_TODAY_PLURAL_CHAT = &x04[Broqch za posetiteli] &x04%&x01hora sa posetili servera dnes!

PEOPLE_VISIT_TODAY_SINGULAR = %d chovek e posetil servera dnes!
PEOPLE_VISIT_TODAY_PLURAL = %d hora sa posetili servera dnes!

YESTERDAY_VISITORS_SINGULAR_CHAT = (&x04%&x01posetitel)
YESTERDAY_VISITORS_PLURAL_CHAT = (&x04%&x01posetitelq)

YESTERDAY_VISITORS_SINGULAR = (%d posetitel)
YESTERDAY_VISITORS_PLURAL = (%d posetitelq)

STATISTIC_RISE_CHAT = &x01Statistikata pokazva pokachvane ot &x04%.1f%% &x01v sravnenie s vchera
STATISTIC_LOSS_CHAT 
= &x01Statistikata pokazva spad ot &x04%.1f%% &x01v sravnenie s vchera

STATISTIC_RISE 
Statistikata pokazva pokachvane ot %.1f%% v sravnenie s vchera
STATISTIC_LOSS 
Statistikata pokazva spad ot %.1f%% v sravnenie s vchera

NO_ACCESS 
Nqmash dostup do tazi komanda
Word of advice - instead of using separate language keys for removing the colors, you can use the "CC_RemoveColors" function and keep a single language key. You can do the same with the prefix by using "CC_SetPrefix".
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-15-2019 , 14:45   Re: Visitor Counter v1.3
Reply With Quote #18

Quote:
Originally Posted by OciXCrom View Post
@DON KHAN 1 - Since when do 12 year olds from Pakistan speak Romanian and Russian?

PHP Code:
[mk]
PEOPLE_VISIT_TODAY_SINGULAR_CHAT = &x04[Brojach na posetiteli] &x04%&x01chovek go posetil serverot denes!
PEOPLE_VISIT_TODAY_PLURAL_CHAT = &x04[Brojach na posetiteli] &x04%&x01lugje go posetile serverot denes!

PEOPLE_VISIT_TODAY_SINGULAR = %d chovek go posetil serverot denes!
PEOPLE_VISIT_TODAY_PLURAL = %d lugje go posetile serverot denes!

YESTERDAY_VISITORS_SINGULAR_CHAT = (&x04%&x01posetitel)
YESTERDAY_VISITORS_PLURAL_CHAT = (&x04%&x01posetitela)

YESTERDAY_VISITORS_SINGULAR = (%d posetitel)
YESTERDAY_VISITORS_PLURAL = (%d posetitela)

STATISTIC_RISE_CHAT = &x01Statistikata pokazhuva porast od &x04%.1f%% &x01vo sporedba so vchera
STATISTIC_LOSS_CHAT 
= &x01Statistikata pokazhuva pad od &x04%.1f%% &x01vo sporedba so vchera

STATISTIC_RISE 
Statistikata pokazhuva porast od %.1f%% vo sporedba so vchera
STATISTIC_LOSS 
Statistikata pokazhuva pad od %.1f%% vo sporedba so vchera

NO_ACCESS 
Nemash dostap do ovaa komanda!

[
bg]
PEOPLE_VISIT_TODAY_SINGULAR_CHAT = &x04[Broqch za posetiteli] &x04%&x01chovek e posetil servera dnes!
PEOPLE_VISIT_TODAY_PLURAL_CHAT = &x04[Broqch za posetiteli] &x04%&x01hora sa posetili servera dnes!

PEOPLE_VISIT_TODAY_SINGULAR = %d chovek e posetil servera dnes!
PEOPLE_VISIT_TODAY_PLURAL = %d hora sa posetili servera dnes!

YESTERDAY_VISITORS_SINGULAR_CHAT = (&x04%&x01posetitel)
YESTERDAY_VISITORS_PLURAL_CHAT = (&x04%&x01posetitelq)

YESTERDAY_VISITORS_SINGULAR = (%d posetitel)
YESTERDAY_VISITORS_PLURAL = (%d posetitelq)

STATISTIC_RISE_CHAT = &x01Statistikata pokazva pokachvane ot &x04%.1f%% &x01v sravnenie s vchera
STATISTIC_LOSS_CHAT 
= &x01Statistikata pokazva spad ot &x04%.1f%% &x01v sravnenie s vchera

STATISTIC_RISE 
Statistikata pokazva pokachvane ot %.1f%% v sravnenie s vchera
STATISTIC_LOSS 
Statistikata pokazva spad ot %.1f%% v sravnenie s vchera

NO_ACCESS 
Nqmash dostup do tazi komanda
Word of advice - instead of using separate language keys for removing the colors, you can use the "CC_RemoveColors" function and keep a single language key. You can do the same with the prefix by using "CC_SetPrefix".
Thanks for the translations, I didn't know about these functions, they're useful.

Update v1.4
Code:
Updated ML system and shortened the ML file
__________________

Last edited by edon1337; 08-15-2019 at 14:46.
edon1337 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 08-15-2019 , 18:17   Re: Visitor Counter v1.3
Reply With Quote #19

Quote:
Originally Posted by Alber9091 View Post
Well I think that's .php script & you are displaying the data on your web by providing ftp information in your .php script. If still its SQL, then, .php script would be much better for such simple outputs, since they are easy to setup & understand than SQL.
PHP Code:
#include < amxmodx >
#include < sqlx >

#define TABLE_NAME "player_info"

/* Database */
new Host[] = "hostname"
new User[]  =  "user"
new Pass[] =  "pass"
new Db[] =  "databasename"

new MySQL_Query512 ]
new 
Handle:MySQL_Tuple
new Handle:MySQL_Connection

public plugin_init( ) {
    
register_plugin"PlayerInfo""v1""???" )
}

public 
client_putinserverid )
{
    
MySQL_Load(id);
}

public 
plugin_precache( )
{
    
MySQL_Tuple SQL_MakeDbTupleHostUserPassDb )
    
#if AMXX_VERSION_NUM >= 183
        
SQL_SetCharset(MySQL_Tuple,"utf8");
    
#endif
    
    
new ErrorCode
    MySQL_Connection 
SQL_ConnectMySQL_TupleErrorCodeMySQL_QuerycharsmaxMySQL_Query ) )
    
    if( 
MySQL_Connection == Empty_Handle )
        
set_fail_stateMySQL_Query )
    
formatexMySQL_QuerycharsmaxMySQL_Query ), "CREATE TABLE IF NOT EXISTS %s (id int NOT NULL AUTO_INCREMENT, username VARCHAR(128), steam_id VARCHAR(20), ip_adress VARCHAR(15), date DATE, time TIME, primary key (id) )"TABLE_NAME )

    
SQL_ThreadQueryMySQL_Tuple"SQL_TrashHandler"MySQL_Query )  
}

public 
MySQL_Loadid 
{
    new 
szAuth[32]; 
    
get_user_authid(idszAuth31);
    
    new 
Temp]
    
Temp] = id
    
    formatex
MySQL_QuerycharsmaxMySQL_Query ), "SELECT `steam_id` FROM %s WHERE `steam_id` = '%s'"TABLE_NAMEszAuth )
    
SQL_ThreadQueryMySQL_Tuple"Load_PlayerInfo"MySQL_QueryTempsizeofTemp ) )
}
                                                                                
public 
Load_PlayerInfoFailStateHandle:QueryError[ ], ErrcodeData[ ], DataSize 
{
    if( 
FailState == TQUERY_CONNECT_FAILED ) { return PLUGIN_HANDLED; }            
    else if( 
FailState == TQUERY_QUERY_FAILED ) { return PLUGIN_HANDLED; }

    new 
id Data]
    
    if( !
is_user_connectedid ) )
        return 
PLUGIN_HANDLED;
        
    new 
szAuth[32], szName[32], szIP[23], currentTime[9], currentDate[11]; 
    
get_user_authid(idszAuth31);
    
get_user_name(idszName31);
    
get_user_ip(idszIP221);
    
get_time("%H:%M:%S"currentTime8
    
get_time("%Y/%m/%d"currentDate10)

    if( 
SQL_NumResultsQuery ) < 
    {
        
formatexMySQL_QuerycharsmaxMySQL_Query ), "INSERT INTO %s (`username`, `steam_id`, `ip_adress`, `date`, `time`) VALUES ('%s', '%s', '%s', '%s', '%s')"TABLE_NAMEszNameszAuthszIPcurrentDatecurrentTime )
        
SQL_ThreadQueryMySQL_Tuple"SQL_TrashHandler"MySQL_Query )
    }
    else {
        
formatexMySQL_QuerycharsmaxMySQL_Query ), "UPDATE %s SET `date` = '%s', `time` = '%s' WHERE `steam_id` = '%s'"TABLE_NAMEcurrentDatecurrentTimeszAuth  )
        
SQL_ThreadQueryMySQL_Tuple"SQL_TrashHandler"MySQL_Query )
    }
    return 
PLUGIN_CONTINUE;
}

public 
SQL_TrashHandlerFailState,Handle:QueryError[ ], Errcode,Data[ ], DataSize )  

    if( 
FailState == TQUERY_CONNECT_FAILED )
        return 
PLUGIN_HANDLED;
        
    else if( 
FailState == TQUERY_QUERY_FAILED )
        return 
PLUGIN_HANDLED;
    
    
SQL_FreeHandleQuery )
    return 
PLUGIN_CONTINUE;
}

public 
plugin_end( ) 
{   
    
SQL_FreeHandleMySQL_Connection )

SQLx, and using that info, pulling data using a php script. I believe either Bugsy or someone else scripted this, don't recall.
__________________

Home of the AMX SUPER
Discord
DruGzOG is offline
Send a message via AIM to DruGzOG
DevilBoy.eXe
Member
Join Date: Mar 2017
Location: Romania
Old 08-16-2019 , 16:22   Re: Visitor Counter v1.4
Reply With Quote #20

The correct Romanian translation.
Code:
[ro]
PEOPLE_VISIT_TODAY_SINGULAR = &x04[Visitor Counter] &x04%d &x01persoana a vizitat astazi serverul!
PEOPLE_VISIT_TODAY_PLURAL = &x04[Visitor Counter] &x04%d &x01persoane au vizitat astazi serverul!

YESTERDAY_VISITORS_SINGULAR = (&x04%d &x01vizitator)
YESTERDAY_VISITORS_PLURAL = (&x04%d &x01vizitatori)

STATISTIC_RISE = &x01Este o crestere cu &x04%.1f%% &x01comparativ cu ieri.
STATISTIC_LOSS = &x01Este o scadere cu &x04%.1f%% &x01comparativ cu ieri.

NO_ACCESS = Nu ai acces la aceasta comanda!
Some suggestion
1. Add cvar output motd or chat
2. Add nickname, ip and hour when player joined the server
3. Make a function that calculate and show at what hour joined the most players on server.
4. Add saving in nvault and mysql but leave saving in .ini file as it is, to be like a backup for nvault or mysql

What can i say, a great plugin, good job!
__________________


Last edited by DevilBoy.eXe; 08-16-2019 at 16:37.
DevilBoy.eXe is offline
Send a message via Yahoo to DevilBoy.eXe Send a message via Skype™ to DevilBoy.eXe
Reply


Thread Tools
Display Modes

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 12:16.


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