Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
Plugin prezenta/conectare
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Fixed issues
Author
Message
1067
Nelutzu
[The Godfather]
Status: Offline
(since 24-06-2019 12:42)
Joined: 19 Apr 2008
Posts: 919
,
Topics: 119
Location:
Suceava
Reputation:
-18.8
Votes
: 24
Posted: 18-02-2014, 00:01:59
| Translate post to:
... (
Click for more languages
)
Nume: Plugin prezenta/conectare
Descriere: Am nevoie de un plugin relativ simplu, care sa-mi scrie intr-un fisier (prezenta.txt) cand se conecteaza fiecare admin sau ultima data la care s-a conectat fiecare admin (ziua, ora).
Exemplu: Fisierul .txt sa arate cam asa:
Code:
nume_admin|ultima_conectare(sau fiecare data cand s-a conectat, in cazul in care nu e posibil de afisat ultima conectare)
0
0
Back to top
Cosm1n1996
[Mentally Stable]
Status: Offline
(since 27-02-2014 21:12)
Joined: 26 Dec 2013
Posts: 121
,
Topics: 32
Location:
Romania
Reputation:
49.4
Votes
: 2
Posted: 18-02-2014, 01:20:14
| Translate post to:
... (
Click for more languages
)
Spoiler:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Admins Activity Loger"
#define VERSION "1.0"
#define AUTHOR "cyby"
new g_cmd[512];
new g_datadir[64];
new g_logfile[64];
new current_time[64];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
}
public plugin_cfg()
{
get_datadir(g_datadir, 63);
format(g_logfile, 63, "%s/admins_activity.txt", g_datadir);
if(!file_exists(g_logfile))
write_file(g_logfile,"");
}
public client_command(id)
{
read_argv(0, g_cmd, 511);
new args[512];
read_args(args, 511);
if(containi(g_cmd, "amx_") != -1 || containi(g_cmd, "admin_") != -1)
{
if(!is_user_admin(id))
return;
format(g_cmd, 511, "%s %s", g_cmd, args);
new name[32];
get_user_name(id, name, 31);
get_time("%d/%m/%Y - %H:%M:%S", current_time, 63);
format(g_cmd, 511, "[%s] [%s] [Command: ^"%s^"]^n", current_time, name, g_cmd);
new file = fopen(g_logfile, "at");
fprintf(file, g_cmd);
fclose(file);
}
}
public client_disconnect(id)
{
if(!is_user_admin(id))
return;
new name[32];
get_user_name(id, name, 31);
new played_time = get_user_time(id, 1) / 60;
get_time("%d/%m/%Y - %H:%M:%S", current_time, 63);
new buffer[256];
format(buffer, 255, "[%s] [%s] [Time Played : %d min.]^n", current_time, name, played_time);
new file = fopen(g_logfile, "at");
fprintf(file, buffer);
fclose(file);
}
ia de aici fratica poate nu e ceea ce vr dar e asemanator cu ce caut u
_____________________________________________
Fac scripturi html dupa preferinte.Lasati PM cu datele
0
0
Back to top
Nelutzu
[The Godfather]
Status: Offline
(since 24-06-2019 12:42)
Joined: 19 Apr 2008
Posts: 919
,
Topics: 119
Location:
Suceava
Reputation:
-18.8
Votes
: 24
Posted: 18-02-2014, 12:25:21
| Translate post to:
... (
Click for more languages
)
Asta arata timpul jucat.. eu vreau sa salvez ultima conectare..
E bun si asta dar nu e exact ce caut eu.
0
0
Back to top
smeș
[Mentally Stable]
Status: Offline
(since 16-03-2014 08:29)
Joined: 08 Feb 2014
Posts: 32
,
Topics: 7
Location:
Constangeles.
Reputation:
37.8
Votes
: 2
Posted: 24-02-2014, 08:59:34
| Translate post to:
... (
Click for more languages
)
Click.
Acest plugin salveazã și comenzile adminilor, aratã și când s-au conectat, când s-au deconectat...
0
0
Back to top
andrei@!
[Banned user]
Status: Offline
(since 25-03-2014 17:27)
Joined: 12 Jan 2014
Posts: 140
,
Topics: 24
Location:
Bucureºti
Reputation:
-47.9
Votes
: 6
Posted: 24-02-2014, 15:31:35
| Translate post to:
... (
Click for more languages
)
cautati pluginul amx_last
0
0
Back to top
EDUTz
[HardcoreAmxxScripter]
Status: Offline
(since 15-08-2021 16:34)
Joined: 27 Dec 2010
Posts: 4306
,
Topics: 244
Location:
Jud. Miserupia, sat Bagadanc
Reputation:
4085
Votes
: 179
Posted: 20-03-2014, 20:53:32
| Translate post to:
... (
Click for more languages
)
Nelutzu wrote:
Nume: Plugin prezenta/conectare
Descriere: Am nevoie de un plugin relativ simplu, care sa-mi scrie intr-un fisier (prezenta.txt) cand se conecteaza fiecare admin sau ultima data la care s-a conectat fiecare admin (ziua, ora).
Exemplu: Fisierul .txt sa arate cam asa:
Code:
nume_admin|ultima_conectare(sau fiecare data cand s-a conectat, in cazul in care nu e posibil de afisat ultima conectare)
Code:
#include <amxmodx>
#include <amxmisc>
new fisier[64]
public plugin_init()
{
register_plugin("conectare admini", "1.0", "EDUTz")
get_time( "addons/amxmodx/logs/admini/admini_%Y%m%d.log", fisier, charsmax (fisier) )
}
public client_putinserver(id)
{
if(is_user_admin(id))
{
new Nume[36], text[64]
get_user_name(id, Nume, charsmax(Nume))
formatex(text, charsmax(text), "Adminul %s a intrat", Nume)
log_to_file(fisier, text)
}
}
public client_disconnect(id)
{
if(is_user_admin(id))
{
new Nume[36], text[64]
get_user_name(id, Nume, charsmax(Nume))
formatex(text, charsmax(text), "Adminul %s a a iesit", Nume)
log_to_file(fisier, text)
}
}
Pentru pluginuri complicate le fac cu $$ pe paypal/psc. PM
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Fixed issues
The time now is 15-12-2024, 14:05:13
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details