Advertisement
Guest User

Untitled

a guest
Dec 6th, 2013
2,206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. //////////////===================================ANTI AFK System ============= //////
  2. /*----------------------------------------------------------------------------------
  3. Created By: Kenrque
  4. Date created: 6.12.2013 - 17:07
  5. Scripting time: 2min.
  6. *///////========================================ANTI AFK System =============== /////
  7. #include <a_samp> // GLOBAL SAMP INCLUDE FOR SCRIPTING NO DELETE (IF DELETED NOT COMPILED AND ERRORS!)
  8. #define SCM SendClientMessage
  9. #define SCMToAll SendClientMessageToAll
  10. #define Sec(%0) (( %0 ) * ( 1000 ))
  11. #define Min(%0) (( %0 ) * ( 1000*60 ))
  12. #define Sati(%0) (( %0 ) * ( 1000*60*60 ))
  13. ///======================================================= SCRIPT ====================///
  14. public OnFilterScriptInit()
  15. {
  16. SetTimer("AntiAFK",Min(10),true); // timer set and define....
  17. return 1;
  18. }
  19. forward AntiAFK(playerid);
  20. public AntiAFK(playerid) // function for seted timer what job? :D
  21. {
  22. SCM(playerid,-1,"[<< Anti AFK] You kicked from server! Max AFK 10 minutes...");
  23. Kick(playerid);
  24. SCMToAll(-1,"%s has been kicked from server,reason AFK.",GetName(playerid));
  25. return 1;
  26. }
  27. stock GetName(playerid)
  28. {
  29. new pName[MAX_PLAYER_NAME];
  30.  
  31. GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  32. return pName;
  33. }
  34. //==========================BALKANIAN LANGUAGE ============ //////
  35. //////////////===================================ANTI AFK System ============= //////
  36. /*----------------------------------------------------------------------------------
  37. Kreirao: Kenrque
  38. Vrijeme kreirane skripte: 6.12.2013 - 17:07
  39. Skriptanje: 2min.
  40. *///////========================================ANTI AFK System =============== /////
  41. #include <a_samp> // globalni SAMP include koji sve definise primjera public onplayerspawn ne brisi
  42. #define SCM SendClientMessage
  43. #define SCMToAll SendClientMessageToAll
  44. #define Sec(%0) (( %0 ) * ( 1000 ))
  45. #define Min(%0) (( %0 ) * ( 1000*60 ))
  46. #define Sati(%0) (( %0 ) * ( 1000*60*60 ))
  47. ///======================================================= SCRIPT ====================///
  48. public OnFilterScriptInit()
  49. {
  50. SetTimer("AntiAFK",Min(10),true); // timer postavljen i definiran
  51. return 1;
  52. }
  53. forward AntiAFK(playerid);
  54. public AntiAFK(playerid) // FUNKCIJA KOJA SALJE STA SE NAPRAVI od timera postavljenog/setanog.
  55. {
  56. SCM(playerid,-1,"[<< Anti AFK] Vi ste Kickani sa servera, Max AFK je 10 minuta..");
  57. Kick(playerid);
  58. SCMToAll(-1," [<< Anti AFK] %s je kikovan od strane ANTI AFK-a | Razlog (Vise bio od MAX AFK-a(10min)",NadjiIme(playerid));
  59. return 1;
  60. }
  61. stock NadjiIme(playerid)
  62. {
  63. new
  64. pName[MAX_PLAYER_NAME];
  65.  
  66. GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  67. return pName;
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement