Advertisement
OtaconEvil

[FS] Simple Pasamontañas v2 BY OTACON

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