Guest User

Anti Clan Fake Italian Version

a guest
Jul 30th, 2011
678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.10 KB | None | 0 0
  1. #include <a_samp>
  2. #define DIALOGCLAN 1000
  3. #define TAGCLAN "clantag" // esempio [ITS]
  4. #define PASSWORDCLAN "password" //inserisci la clan password
  5. #define ROSA                 0xFF66FFAA
  6. #define BLU_CHIARO           0x00BFFFAA
  7.  
  8. public OnFilterScriptInit()
  9. {
  10.     print("\n------------------------------------------");
  11.     print(" Anti fakeclan system by [ITS]StatickShock");
  12.     print("------------------------------------------\n");
  13.     return 1;
  14. }
  15.  
  16. public OnPlayerConnect(playerid)
  17. {
  18.     new stringa[500];
  19.     new nome[24];
  20.     GetPlayerName(playerid, nome, 24);
  21.     if(strfind(nome, TAGCLAN, true) == 0)
  22.     {
  23.         format(stringa, sizeof(stringa), "{FFFFFF}Benvenuto {FF4444}%s{FFFFFF}!\nDevi confermare di far parte del clan {FF4444}%s{FFFFFF}.\n{FFFFFF}Inserisci la password del clan e conferma.", nome);
  24.         ShowPlayerDialog(playerid, DIALOGCLAN, DIALOG_STYLE_INPUT, "{33AA33}Clan", stringa, "Conferma", "Esci");
  25.     }
  26.     else
  27.     {
  28.         SendClientMessage(playerid, BLU_CHIARO, "Benvenuto!");
  29.     }
  30.     return 1;
  31. }
  32.  
  33.  
  34. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  35. {
  36.  
  37.     {
  38.         new stringa[500];
  39.         if(dialogid == DIALOGCLAN)
  40.         {
  41.             if(response)
  42.             {
  43.                 if(!strlen(inputtext))
  44.                 {
  45.                     new nome[24];
  46.                     GetPlayerName(playerid, nome, 24);
  47.                     format(stringa, sizeof stringa, "{FF4444}Errore:{FFFFFF} Inserisci una password.\n\n{FFFFFF}Benvenuto {FF4444}%s{FFFFFF}!\nDevi confermare di far parte del clan {FF4444}%s{FFFFFF}.\n{FFFFFF}Inserisci la password del clan e conferma.", nome);
  48.                     ShowPlayerDialog(playerid, DIALOGCLAN, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Conferma", "Esci");
  49.                     return 0;
  50.                 }
  51.                 if(!strcmp(inputtext, PASSWORDCLAN, false))
  52.                 {
  53.                     new nome[24];
  54.                     GetPlayerName(playerid, nome, 24);
  55.                     format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} conferma di far parte del clan.", nome);
  56.                     SendClientMessageToAll(BLU_CHIARO, stringa);
  57.                     SendClientMessage(playerid, BLU_CHIARO, "Hai confermato di far parte del clan");
  58.                     PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  59.                     return 1;
  60.                 }
  61.                 else
  62.                 {
  63.                     new nome[24];
  64.                     GetPlayerName(playerid, nome, 24);
  65.                     format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Tentativo login nel clan fallito{00BFFF}]", nome);
  66.                     SendClientMessageToAll(BLU_CHIARO, stringa);
  67.                     SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei stato kickato. Motivo: {FF66FF}Tentativo login nel clan fallito{FFFFFF}.");
  68.                     Kick(playerid);
  69.                 }
  70.             }
  71.             else if(!response)
  72.             {
  73.                 new nome[24];
  74.                 GetPlayerName(playerid, nome, 24);
  75.                 SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei stato kickato. Motivo: {FF66FF}Tentativo login nel clan fallito{FFFFFF}.");
  76.                 format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Tentativo login nel clan fallito{00BFFF}]", nome);
  77.                 SendClientMessageToAll(BLU_CHIARO, stringa);
  78.                 Kick(playerid);
  79.                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  80.             }
  81.         }
  82.         return 1;
  83.     }
  84. }
Advertisement
Add Comment
Please, Sign In to add comment