Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////===================================ANTI AFK System ============= //////
- /*----------------------------------------------------------------------------------
- Created By: Kenrque
- Date created: 6.12.2013 - 17:07
- Scripting time: 2min.
- *///////========================================ANTI AFK System =============== /////
- #include <a_samp> // GLOBAL SAMP INCLUDE FOR SCRIPTING NO DELETE (IF DELETED NOT COMPILED AND ERRORS!)
- #define SCM SendClientMessage
- #define SCMToAll SendClientMessageToAll
- #define Sec(%0) (( %0 ) * ( 1000 ))
- #define Min(%0) (( %0 ) * ( 1000*60 ))
- #define Sati(%0) (( %0 ) * ( 1000*60*60 ))
- ///======================================================= SCRIPT ====================///
- public OnFilterScriptInit()
- {
- SetTimer("AntiAFK",Min(10),true); // timer set and define....
- return 1;
- }
- forward AntiAFK(playerid);
- public AntiAFK(playerid) // function for seted timer what job? :D
- {
- SCM(playerid,-1,"[<< Anti AFK] You kicked from server! Max AFK 10 minutes...");
- Kick(playerid);
- SCMToAll(-1,"%s has been kicked from server,reason AFK.",GetName(playerid));
- return 1;
- }
- stock GetName(playerid)
- {
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- return pName;
- }
- //==========================BALKANIAN LANGUAGE ============ //////
- //////////////===================================ANTI AFK System ============= //////
- /*----------------------------------------------------------------------------------
- Kreirao: Kenrque
- Vrijeme kreirane skripte: 6.12.2013 - 17:07
- Skriptanje: 2min.
- *///////========================================ANTI AFK System =============== /////
- #include <a_samp> // globalni SAMP include koji sve definise primjera public onplayerspawn ne brisi
- #define SCM SendClientMessage
- #define SCMToAll SendClientMessageToAll
- #define Sec(%0) (( %0 ) * ( 1000 ))
- #define Min(%0) (( %0 ) * ( 1000*60 ))
- #define Sati(%0) (( %0 ) * ( 1000*60*60 ))
- ///======================================================= SCRIPT ====================///
- public OnFilterScriptInit()
- {
- SetTimer("AntiAFK",Min(10),true); // timer postavljen i definiran
- return 1;
- }
- forward AntiAFK(playerid);
- public AntiAFK(playerid) // FUNKCIJA KOJA SALJE STA SE NAPRAVI od timera postavljenog/setanog.
- {
- SCM(playerid,-1,"[<< Anti AFK] Vi ste Kickani sa servera, Max AFK je 10 minuta..");
- Kick(playerid);
- SCMToAll(-1," [<< Anti AFK] %s je kikovan od strane ANTI AFK-a | Razlog (Vise bio od MAX AFK-a(10min)",NadjiIme(playerid));
- return 1;
- }
- stock NadjiIme(playerid)
- {
- new
- pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- return pName;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement