Advertisement
Guest User

FS made by RASCAL

a guest
Oct 25th, 2010
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1.  
  2. #include <a_samp>
  3. #include <Dini>
  4. #define RekordFile "rekord.txt"
  5. new str[128];
  6. new TimerRekord;
  7. #define FILTERSCRIPT
  8. forward KonektovanjeIgraca();
  9.  
  10.  
  11. public OnFilterScriptInit()
  12. {
  13. print("\n-------------------------------------------------");
  14. print(" FS [rekord] ucitana");
  15. print("-------------------------------------------------\n");
  16. if(!dini_Exists(RekordFile))
  17. {
  18. dini_Create(RekordFile);
  19. printf("Napravljen %s file.",RekordFile);
  20. }
  21. dini_IntSet(RekordFile,"rekord",0);
  22. TimerRekord = SetTimer("Rekord",180000,true);
  23. return 1;
  24. }
  25.  
  26. public OnFilterScriptExit()
  27. {
  28. KillTimer(TimerRekord);
  29. return 1;
  30. }
  31.  
  32. forward Rekord(playerid);
  33. public Rekord(playerid)
  34. {
  35. new rekordigraca = dini_Int(RekordFile,"rekord");
  36. new konektovanje = KonektovanjeIgraca();
  37. if(rekordigraca < konektovanje)
  38. {
  39. dini_IntSet(RekordFile,"rekord",konektovanje);
  40. format(str,sizeof(str),"Maximalno igraca online [%d]",konektovanje);
  41. SendClientMessageToAll(0x33AA33AA,str);
  42. } else {
  43. new starirekord = dini_Int(RekordFile,"rekord");
  44. format(str,sizeof(str),"Maximalno online igraca [%d] ",starirekord);
  45. SendClientMessageToAll(0x33AA33AA,str);
  46. }
  47. return 1;
  48. }
  49.  
  50.  
  51. public KonektovanjeIgraca()
  52. {
  53. new Konektovan;
  54. for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) Konektovan++;
  55. return Konektovan;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement