Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //NON RIMUOVERE I CREDITI :D
- /*
- ********************************************************************************
- * ---=== [Niko_Hs Afk_System] ===--- *
- * "N-Afk System" *
- * *** Versione 1.0 *** *
- * "Copyright @ Niko_Hs" *
- * "In Basso la descrizione dell'[FS]©" *
- ********************************************************************************
- */
- ////////////////////////////////////////////////////////////////////////////////
- //Include
- #include <a_samp>
- ////////////////////////////////////////////////////////////////////////////////
- //Colori define
- #define COLORE_ARANCIONE 0xFF9011AA // arancione
- #define COLORE_BLU 0x33CCFFAA // blu
- #define COLORE_ROSSO 0xED0700AA // rosso
- #define COLORE_BIANCO 0xFFFFFFAA // bianco
- #define COLORE_VERDE 0x33AA33AA // verde
- #define COLORE_VG 0xADFF2FAA //verde giallastro
- #define COLORE_LR 0xF60000AA //rosso acceso
- ////////////////////////////////////////////////////////////////////////////////
- //Altri define
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- //><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
- //New
- new afknome[MAX_PLAYER_NAME];
- new string[256];
- new BRB[MAX_PLAYERS];
- new AFK[MAX_PLAYERS];
- //><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" AFK System V.1.0 By Niko_Hs Caricato.");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" [FS] AFK System V.1.0 By Niko_Hs Chiuso.");
- print("--------------------------------------\n");
- return 1;
- }
- #endif
- ////////////////////////////////////////////////////////////////////////////////
- public OnPlayerConnect(playerid)
- {
- AFK[playerid] = 0;
- BRB[playerid] = 0;
- return 1;
- }
- //><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- //><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
- if(strcmp(cmdtext, "/afklista", true) == 0)
- {
- SendClientMessage(playerid,COLORE_ARANCIONE,"Lista Player AFK:");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(BRB[i] == 1 || AFK[i] == 1)
- {
- GetPlayerName(i,afknome,sizeof(afknome));
- format(string,256,"Nome: %s || ID: %i",afknome,i);
- SendClientMessage(playerid,COLORE_BIANCO,string);
- }
- }
- }
- return 1;
- }
- //><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
- if(strcmp(cmdtext, "/brb", true) == 0) {
- if(BRB[playerid] == 0 && AFK[playerid] == 0)
- {
- GetPlayerName(playerid, afknome, sizeof(afknome));
- format(string, sizeof(string), "%s è in una breve pausa! (/brb)", afknome);
- SendClientMessageToAll(COLORE_VG, string);
- SendClientMessage(playerid, COLORE_BLU, "Sei attualmente BRB. Usa /back per tornare in gioco.");
- SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid) + 210);
- BRB[playerid] = 1;
- AFK[playerid] = 0;
- return 1;
- }
- else
- {
- SendClientMessage(playerid,COLORE_BLU, "Sei attualmente BRB. Usa /back per tornare in gioco.");
- return 1;
- }
- }
- //><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
- if(strcmp(cmdtext, "/back", true) == 0)
- {
- if(BRB[playerid] == 1 || AFK[playerid] == 1)
- {
- GetPlayerName(playerid, afknome, sizeof(afknome));
- format(string, sizeof(string), "%s è tornato in gioco. (/back)", afknome);
- SendClientMessageToAll(COLORE_VG, string);
- SetPlayerVirtualWorld(playerid, 0);
- BRB[playerid] = 0;
- AFK[playerid] = 0;
- return 1;
- }
- else
- {
- SendClientMessage(playerid,COLORE_BLU, "Sei tornato in gioco.");
- return 1;
- }
- }
- //><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
- if(strcmp(cmdtext, "/afk", true) == 0)
- {
- if(BRB[playerid] == 0 && AFK[playerid] == 0)
- {
- GetPlayerName(playerid, afknome, sizeof(afknome));
- format(string, sizeof(string), "%s è andato in Pausa.(/afk)", afknome);
- SendClientMessageToAll(COLORE_VG, string);
- SendClientMessage(playerid, COLORE_BLU, "Sei AFK digita (/back) per tornare in gioco.");
- SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid) + 123);
- BRB[playerid] = 0;
- AFK[playerid] = 1;
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLORE_BLU, "Sei AFK digita (/back) per tornare in gioco.");
- return 1;
- }
- }
- return 0;
- }
- ////////////////////////////////////////////////////////////////////////////////
- //Usa /brb , /afk , /back , /afklista.
- //NON RIMUOVERE I CREDITI :D
- ////////////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment