Advertisement
OtaconEvil

[FS] Simple Pasamontañas BY OTACON

Jul 9th, 2013
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 9.59 KB | None | 0 0
  1. /*
  2.              Prohibido TOTALMENTE el Robo de Créditos o la
  3.                  Publicación de este FS sin Mi Permiso.
  4. */
  5. /////////////////////////////////////////////////////////////////////////////////////
  6. /////////////////////////////////////////////////////////////////////////////////////
  7. /*
  8.     ----------------------------------------------------------
  9.     |         [FS] --<  [FS] Simple Pasamontañas  >--        |
  10.     |                                                        |
  11.     |               Creado Por ØTACØN - 2012                 |
  12.     ----------------------------------------------------------
  13.     ----------------------------------------------------------
  14.     |      FS CREADO PARA LOS USUARIOS NOVATOS EN PAWNO      |
  15.     ----------------------------------------------------------
  16. */
  17. /////////////////////////////////////////////////////////////////////////////////////
  18. /////////////////////////////////////////////////////////////////////////////////////
  19.  
  20. #include <a_samp>
  21. #define Morado 0xC2A2DAFF
  22. #define Gris 0xb0b0b0FF
  23. #define Blanco 0xFFFFFFFF
  24. #define RojoOscuro 0x5b0000FF
  25. new Pasamont[MAX_PLAYERS];
  26.  
  27. public OnFilterScriptInit()
  28. {
  29.     print("               ,        ,");
  30.     print("              /(        )`");
  31.     print("              | |___   / ||");
  32.     print("              /- _  `-/  '");
  33.     print("             (/|/ | |   /|");
  34.     print("             / /   | `    |");
  35.     print("             O O   ) /    |");
  36.     print("             `-^--'`<     '");
  37.     print("            (_.)  _  )   /");
  38.     print("             `.___/`    /");
  39.     print("               `-----' /");
  40.     print("  <----.     __ / __   |");
  41.     print("  <----|====O)))==) |) /====");
  42.     print("  <----'    `--' `.__,' |");
  43.     print("               |        |");
  44.     print("                |       /");
  45.     print("           ______( (_  / |______");
  46.     print("         ,'  ,-----'   |        |");
  47.     print("       `--{__________)         ");
  48.     print("\n|---------------------------------------|");
  49.     print("|          Filescript por <ØTACØN>        |");
  50.     print("|      Simple Pasamontañas -- Cargado     |");
  51.     print("|-----------------------------------------|\n");
  52.  
  53.     print("\n|-----------------------------------------------------|");
  54.     print("|     Prohibido TOTALMENTE el Robo de  Créditos o la    |");
  55.     print("|         Publicación de este FS sin Mi Permiso         |");
  56.     print("|-------------------------------------------------------|\n");
  57.     return 1;
  58. }
  59.  
  60. public OnFilterScriptExit()
  61. {
  62.     print("               ,        ,");
  63.     print("              /(        )`");
  64.     print("              | |___   / ||");
  65.     print("              /- _  `-/  '");
  66.     print("             (/|/ | |   /|");
  67.     print("             / /   | `    |");
  68.     print("             O O   ) /    |");
  69.     print("             `-^--'`<     '");
  70.     print("            (_.)  _  )   /");
  71.     print("             `.___/`    /");
  72.     print("               `-----' /");
  73.     print("  <----.     __ / __   |");
  74.     print("  <----|====O)))==) |) /====");
  75.     print("  <----'    `--' `.__,' |");
  76.     print("               |        |");
  77.     print("                |       /");
  78.     print("           ______( (_  / |______");
  79.     print("         ,'  ,-----'   |        |");
  80.     print("       `--{__________)         ");
  81.     print("\n|---------------------------------------|");
  82.     print("|          Filescript por <ØTACØN>        |");
  83.     print("|      Simple Pasamontañas -- Cerrado     |");
  84.     print("|-----------------------------------------|\n");
  85.  
  86.     print("\n|-----------------------------------------------------|");
  87.     print("|     Prohibido TOTALMENTE el Robo de  Créditos o la    |");
  88.     print("|         Publicación de este FS sin Mi Permiso         |");
  89.     print("|-------------------------------------------------------|\n");
  90.     return 1;
  91. }
  92.  
  93. public OnPlayerCommandText(playerid, cmdtext[])
  94. {
  95.     new str[128];
  96.     //===================== [FS] --<  [FS] Simple Pasamontañas  >-- =====================
  97.     if(!strcmp(cmdtext, "/VerPasamontañas", true))
  98.     {
  99.         if(!IsPlayerAdmin(playerid))
  100.         {
  101.             SendClientMessage(playerid, Gris, "    [ ! ] Usted No Esta Autolizado a Utilizar Este Comando!.");
  102.             return 1;
  103.         }
  104.         if(IsPlayerConnected(playerid))
  105.         {
  106.             SendClientMessage(playerid, RojoOscuro, "|____ Usuarios Con Pasamontañas ____|");
  107.             for(new a; a < GetMaxPlayers(); a++)
  108.             {
  109.                 if(IsPlayerConnected(a))
  110.                 {
  111.                     if(Pasamont[a] == 1)
  112.                     {
  113.                         new Name[MAX_PLAYER_NAME]; GetPlayerName(a,Name, sizeof Name);
  114.                         format(str, sizeof(str), "    * %s - [ID:%i] Tiene Pasamontañas Colocado.", Name, a);
  115.                         SendClientMessage(playerid, Blanco, str);
  116.                         return 1;
  117.                     }
  118.                     else if(Pasamont[a] == 0)
  119.                     {
  120.                         format(str, sizeof(str), "    * 'No Hay Nadie Con Pasamontañas!.");
  121.                         SendClientMessage(playerid, Blanco, str);
  122.                         return 1;
  123.                     }
  124.                 }
  125.             }
  126.         }
  127.         return 1;
  128.     }
  129.     //===================================================================================
  130.     if(!strcmp(cmdtext, "/Pasamontañas", true))
  131.     {
  132.         if(IsPlayerConnected(playerid))
  133.         {
  134.             if(Pasamont[playerid] == 0)
  135.             {
  136.                 Pasamont[playerid] = 1;
  137.                 for(new i; i < GetMaxPlayers(); i++) ShowPlayerNameTagForPlayer(i, playerid, false);
  138.                 SendClientMessage(playerid, Gris, "    [ ! ] Te Colocaste El Pasamontañas!.");
  139.  
  140.                 new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name, sizeof Name);
  141.                 format(str, sizeof(str), "*  %s Se Coloca Un Pasamontañas En El Rostro.", Name);
  142.                 ProxDetector(30.0, playerid, str, Morado,Morado,Morado,Morado,Morado);
  143.                 return 1;
  144.             }
  145.             else if(Pasamont[playerid] == 1)
  146.             {
  147.                 Pasamont[playerid] = 0;
  148.                 for(new i; i < GetMaxPlayers(); i++) ShowPlayerNameTagForPlayer(i, playerid, true);
  149.                 SendClientMessage(playerid, Gris, "    [ ! ] Te Quitaste El Pasamontañas!.");
  150.  
  151.                 new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name, sizeof Name);
  152.                 format(str, sizeof(str), "*  %s Se Quita El Pasamontañas Del Rostro.", Name);
  153.                 ProxDetector(30.0, playerid, str, Morado,Morado,Morado,Morado,Morado);
  154.                 return 1;
  155.             }
  156.         }
  157.         return 1;
  158.     }
  159.     //===================================================================================
  160.     return 0;
  161. }
  162.    
  163. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  164. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  165. {
  166.    if(IsPlayerConnected(playerid))
  167.    {
  168.        new Float:posx, Float:posy, Float:posz;
  169.        new Float:oldposx, Float:oldposy, Float:oldposz;
  170.        new Float:tempposx, Float:tempposy, Float:tempposz;
  171.        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  172.        for(new i; i < GetMaxPlayers(); i++)
  173.        {
  174.           if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
  175.           {
  176.                GetPlayerPos(i, posx, posy, posz);
  177.                tempposx = (oldposx -posx);
  178.                tempposy = (oldposy -posy);
  179.                tempposz = (oldposz -posz);
  180.                if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  181.                {
  182.                   SendClientMessage(i, col1, string);
  183.                }
  184.                else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  185.                {
  186.                   SendClientMessage(i, col2, string);
  187.                }
  188.                else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  189.                {
  190.                   SendClientMessage(i, col3, string);
  191.                }
  192.                else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  193.                {
  194.                   SendClientMessage(i, col4, string);
  195.                }
  196.                else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  197.                {
  198.                   SendClientMessage(i, col5, string);
  199.                }
  200.            }
  201.        }
  202.    }
  203.    return 1;
  204. }
  205. /////////////////////////////////////////////////////////////////////////////////////
  206. /////////////////////////////////////////////////////////////////////////////////////
  207. /*
  208.     ----------------------------------------------------------
  209.     |         [FS] --<  [FS] Simple Pasamontañas  >--        |
  210.     |                                                        |
  211.     |               Creado Por ØTACØN - 2012                 |
  212.     ----------------------------------------------------------
  213.     ----------------------------------------------------------
  214.     |      FS CREADO PARA LOS USUARIOS NOVATOS EN PAWNO      |
  215.     ----------------------------------------------------------
  216. */
  217. /////////////////////////////////////////////////////////////////////////////////////
  218. /////////////////////////////////////////////////////////////////////////////////////
  219. /*
  220.              Prohibido TOTALMENTE el Robo de Créditos o la
  221.                  Publicación de este FS sin Mi Permiso.
  222. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement