Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* 1.) Create folder "STATISTIC" to scriptfiles
- * 2.) Create folder "ONLINEPLAYERS" to folder "STATISTIC"
- * 3.) Start the filterscript
- */
- #include <a_samp>
- #include <dudb>
- public OnPlayerConnect(playerid)
- {
- if(!IsPlayerNPC(playerid))
- {
- new year, month, day, hour, minute, second, way[64], item[16];
- getdate(year, month, day);
- gettime(hour, minute, second);
- format(item, sizeof(item), "%02d_hour", hour);
- format(way, sizeof(way), "STATISTIC/%02d_%02d_%d.cfg", day, month, year);
- if(!fexist(way)) dini_Create(way);
- dini_IntSet(way, item, dini_Int(way, item)+1);
- format(way, sizeof(way), "STATISTIC/ONLINEPLAYERS/%02d_%02d_%d.cfg", day, month, year);
- new onlinep = 0;
- for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) if(!IsPlayerNPC(i)) onlinep++;
- if(!fexist(way)) dini_Create(way);
- if(onlinep > dini_Int(way, item)) dini_IntSet(way, item, onlinep);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment