Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <Dini>
- #define RekordFile "rekord.txt"
- new str[128];
- new TimerRekord;
- #define FILTERSCRIPT
- forward KonektovanjeIgraca();
- public OnFilterScriptInit()
- {
- print("\n-------------------------------------------------");
- print(" FS [rekord] ucitana");
- print("-------------------------------------------------\n");
- if(!dini_Exists(RekordFile))
- {
- dini_Create(RekordFile);
- printf("Napravljen %s file.",RekordFile);
- }
- dini_IntSet(RekordFile,"rekord",0);
- TimerRekord = SetTimer("Rekord",180000,true);
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(TimerRekord);
- return 1;
- }
- forward Rekord(playerid);
- public Rekord(playerid)
- {
- new rekordigraca = dini_Int(RekordFile,"rekord");
- new konektovanje = KonektovanjeIgraca();
- if(rekordigraca < konektovanje)
- {
- dini_IntSet(RekordFile,"rekord",konektovanje);
- format(str,sizeof(str),"Maximalno igraca online [%d]",konektovanje);
- SendClientMessageToAll(0x33AA33AA,str);
- } else {
- new starirekord = dini_Int(RekordFile,"rekord");
- format(str,sizeof(str),"Maximalno online igraca [%d] ",starirekord);
- SendClientMessageToAll(0x33AA33AA,str);
- }
- return 1;
- }
- public KonektovanjeIgraca()
- {
- new Konektovan;
- for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) Konektovan++;
- return Konektovan;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement