Advertisement
OtaconEvil

[FS] Crear Lomas de Burro (InGame) Version E

Jul 18th, 2013
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 10.45 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] --<  'Crear Lomas de Burro (InGame)'  >--     |
  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.  
  22. #define Gris  0xb0b0b0FF
  23. #define Celeste  0x00CFF0FF
  24. #define RojoOscuro  0x5b0000FF
  25.  
  26. new Text:InfoLomas[3];
  27. new CreatedLomas[200];
  28. new CreatedLoma = 0;
  29.  
  30. //=============== [ [FS] Crear Lomas de Burro (InGame) ] ===============
  31. new MensajesRandom[][] =
  32. {
  33.     "~w~- <CREAR LOMAS DE BURRO> - ~g~<InGame> - ~y~By Otacon - ~r~V0.3E", //Maximo 50 Caracteres.
  34.     "~g~- <CREAR LOMAS DE BURRO> - ~w~<InGame> - ~y~By Otacon - ~r~V0.3E",
  35.     "~w~- <CREAR LOMAS DE BURRO> - ~g~<InGame> - ~y~By Otacon - ~r~V0.3E"
  36. };
  37. //======================================================================
  38.  
  39. public OnFilterScriptInit()
  40. {
  41.     //=============== [ [FS] Crear Lomas de Burro (InGame) ] ===============
  42.     InfoLomas[1] = TextDrawCreate(481.000000,171.000000,"~y~   - Crear Lomas de Burro ~y~In-Game v0.3E - ~n~~n~~w~  Utiliza los Siguientes Comando:~n~~n~ ~g~/Loma ~w~ (Nombre del Archivo)~n~ ~g~/QuitarLomas ~w~ (Quitar las Lomas Colocadas.)~n~ ~g~/Borrar ~w~ (Borrar TextDraw)~n~ ~g~/Info ~w~ (Ver TextDraw)~n~~n~~n~ ~y~~]~ BY OTACON ~]~");
  43.     TextDrawUseBox(InfoLomas[1],1);
  44.     TextDrawBoxColor(InfoLomas[1],0x0000155);
  45.     TextDrawTextSize(InfoLomas[1],630.000000,250.000000);
  46.     TextDrawAlignment(InfoLomas[1],0);
  47.     TextDrawBackgroundColor(InfoLomas[1],0x000000ff);
  48.     TextDrawFont(InfoLomas[1],1);
  49.     TextDrawLetterSize(InfoLomas[1],0.260000,1.200000);
  50.     TextDrawColor(InfoLomas[1],0xffffffff);
  51.     TextDrawSetOutline(InfoLomas[1],1);
  52.     TextDrawSetProportional(InfoLomas[1],1);
  53.     TextDrawSetShadow(InfoLomas[1],1);
  54.  
  55.     InfoLomas[2] = TextDrawCreate(38.000000, 428.000000,"-_-");
  56.     TextDrawAlignment(InfoLomas[2],0);
  57.     TextDrawBackgroundColor(InfoLomas[2],0x000000ff);
  58.     TextDrawFont(InfoLomas[2],1);
  59.     TextDrawLetterSize(InfoLomas[2],0.430000, 1.400000);
  60.     TextDrawColor(InfoLomas[2],0xffffffff);
  61.     TextDrawSetOutline(InfoLomas[2],1);
  62.     TextDrawSetProportional(InfoLomas[2],1);
  63.     TextDrawSetShadow(InfoLomas[2],1);
  64.     SetTimer("RandomMessageTimer",500,1);
  65.     //===========================================================================
  66.    
  67.     print("               ,        ,");
  68.     print("              /(        )`");
  69.     print("              | |___   / ||");
  70.     print("              /- _  `-/  '");
  71.     print("             (/|/ | |   /|");
  72.     print("             / /   | `    |");
  73.     print("             O O   ) /    |");
  74.     print("             `-^--'`<     '");
  75.     print("            (_.)  _  )   /");
  76.     print("             `.___/`    /");
  77.     print("               `-----' /");
  78.     print("  <----.     __ / __   |");
  79.     print("  <----|====O)))==) |) /====");
  80.     print("  <----'    `--' `.__,' |");
  81.     print("               |        |");
  82.     print("                |       /");
  83.     print("           ______( (_  / |______");
  84.     print("         ,'  ,-----'   |        |");
  85.     print("       `--{__________)         ");
  86.     print("\n|--------------------------------------------|");
  87.     print("|           Filescript por <ØTACØN>            |");
  88.     print("|   Crear Lomas de Burro (InGame) -- Cargano   |");
  89.     print("|----------------------------------------------|\n");
  90.    
  91.     print("\n|-----------------------------------------------------|");
  92.     print("|     Prohibido TOTALMENTE el Robo de  Créditos o la    |");
  93.     print("|         Publicación de este FS sin Mi Permiso         |");
  94.     print("|-------------------------------------------------------|\n");
  95.     return 1;
  96. }
  97.  
  98. public OnFilterScriptExit()
  99. {
  100.     print("               ,        ,");
  101.     print("              /(        )`");
  102.     print("              | |___   / ||");
  103.     print("              /- _  `-/  '");
  104.     print("             (/|/ | |   /|");
  105.     print("             / /   | `    |");
  106.     print("             O O   ) /    |");
  107.     print("             `-^--'`<     '");
  108.     print("            (_.)  _  )   /");
  109.     print("             `.___/`    /");
  110.     print("               `-----' /");
  111.     print("  <----.     __ / __   |");
  112.     print("  <----|====O)))==) |) /====");
  113.     print("  <----'    `--' `.__,' |");
  114.     print("               |        |");
  115.     print("                |       /");
  116.     print("           ______( (_  / |______");
  117.     print("         ,'  ,-----'   |        |");
  118.     print("         `--{__________)         ");
  119.     print("\n|--------------------------------------------|");
  120.     print("|           Filescript por <ØTACØN>            |");
  121.     print("|   Crear Lomas de Burro (InGame) -- Cerrado   |");
  122.     print("|----------------------------------------------|\n");
  123.    
  124.     print("\n|-----------------------------------------------------|");
  125.     print("|     Prohibido TOTALMENTE el Robo de  Créditos o la    |");
  126.     print("|         Publicación de este FS sin Mi Permiso         |");
  127.     print("|-------------------------------------------------------|\n");
  128.     return 1;
  129. }
  130.  
  131. public OnPlayerSpawn(playerid)
  132. {
  133.     //=============== [ [FS] Crear Lomas de Burro (InGame) ] ===============
  134.     TextDrawShowForPlayer(playerid, InfoLomas[1]);
  135.     TextDrawShowForPlayer(playerid, InfoLomas[2]);
  136.     //======================================================================
  137.     return 1;
  138. }
  139.  
  140. public OnPlayerCommandText(playerid, cmdtext[])
  141. {
  142.     new cmd[128], str[128], tmp[128], idx;
  143.     cmd = strtok(cmdtext, idx);
  144.  
  145.     //=============== [ [FS] Crear Lomas de Burro (InGame) ] ===============
  146.     if(strcmp(cmd, "/Lomas", true) == 0)
  147.     {
  148.         if(IsPlayerConnected(playerid))
  149.         {
  150.             tmp = strtok(cmdtext, idx);
  151.             if(strlen(tmp) == 0)
  152.             {
  153.                 SendClientMessage(playerid, Gris, "    [ ! ] Escribe: /Loma [Nombre]");
  154.                 return 1;
  155.             }
  156.            
  157.             new Float:X, Float:Y, Float:Z;
  158.             new Float:rx, Float:ry, Float:rz;
  159.             GetPlayerPos(playerid, X, Y, Z);
  160.             GetPlayerFacingAngle(playerid, rz);
  161.            
  162.             new Loma = CreateObject(19425, X, Y, Z-1, 0.0, 0.0, rz+180);
  163.             CreatedLomas[CreatedLoma] = Loma; CreatedLoma++;
  164.            
  165.             new nombre[32];
  166.             strmid(nombre, tmp, 0, strlen(tmp), sizeof(nombre));
  167.        
  168.             new File:file;
  169.             format(str,sizeof(str),"%s.txt",nombre);
  170.            
  171.             file = fopen(str, io_append);
  172.             fwrite(file,"//=======================================================================\r\n");
  173.             fwrite(file, "              [FS] Crear Lomas de Burro (InGame). By Otacon             \r\n");
  174.             fwrite(file,"//=======================================================================\r\n");
  175.             fwrite(file,"   Agregar en OnGameModeInit() o en OnFilterScriptInit():                \r\n\r\n");
  176.             format(str, sizeof str, "   CreateObject(19425,%0.4f, %0.4f, %0.4f, %0.4f, %0.4f, %0.4f);\r\n\r\n",X, Y, Z-1.9, rx, ry, rz+180);
  177.             fwrite(file,str);
  178.             fwrite(file,"//=======================================================================\r\n//*\r\n");
  179.             fclose(file);
  180.             SendClientMessage(playerid, Celeste, "    [ ! ] Se Ha Creado y Guardado con Exito La Loma de Burro en /scriptfiles");
  181.         }
  182.         return 1;
  183.     }
  184.     //======================================================================
  185.    
  186.     //=============== [ [FS] Crear Lomas de Burro (InGame) ] ===============
  187.     if (strcmp("/Borrar", cmdtext, true, 10) == 0)
  188.     {
  189.         TextDrawHideForPlayer(playerid, InfoLomas[1]);
  190.         TextDrawHideForPlayer(playerid, InfoLomas[2]);
  191.         return 1;
  192.     }
  193.     //=============== [ [FS] Crear Lomas de Burro (InGame) ] ===============
  194.     if (strcmp("/Info", cmdtext, true, 10) == 0)
  195.     {
  196.         TextDrawShowForPlayer(playerid, InfoLomas[1]);
  197.         TextDrawShowForPlayer(playerid, InfoLomas[2]);
  198.         return 1;
  199.     }
  200.     //=============== [ [FS] Crear Lomas de Burro (InGame) ] ===============
  201.     if (strcmp("/QuitarLomas", cmdtext, true, 10) == 0)
  202.     {
  203.         for(new i = 0; i <= CreatedLomas[i]; i++) DestroyObject(CreatedLomas[i]);
  204.         SendClientMessage(playerid, Celeste, "    [ ! ] Has Quitado Todas las Lomas de Burro!.");
  205.         return 1;
  206.     }
  207.     //======================================================================
  208.     return 0;
  209. }
  210.  
  211. forward RandomMessageTimer();
  212. public RandomMessageTimer()
  213. {
  214.     TextDrawSetString(InfoLomas[2], MensajesRandom[random(sizeof(MensajesRandom))]);
  215.     return 1;
  216. }
  217.  
  218. strtok(const string[], &index)
  219. {
  220.     new length = strlen(string);
  221.     while ((index < length) && (string[index] <= ' ')) index++;
  222.     new offset = index;
  223.     new result[20];
  224.     while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  225.     {
  226.         result[index - offset] = string[index];
  227.         index++;
  228.     }
  229.     result[index - offset] = EOS;
  230.     return result;
  231. }
  232.  
  233. /////////////////////////////////////////////////////////////////////////////////////
  234. /////////////////////////////////////////////////////////////////////////////////////
  235. /*
  236.     ----------------------------------------------------------
  237.     |     [FS] --<  'Crear Lomas de Burro (InGame)'  >--     |
  238.     |                                                        |
  239.     |               Creado Por ØTACØN - 2012                 |
  240.     ----------------------------------------------------------
  241.     ----------------------------------------------------------
  242.     |      FS CREADO PARA LOS USUARIOS NOVATOS EN PAWNO      |
  243.     ----------------------------------------------------------
  244. */
  245. /////////////////////////////////////////////////////////////////////////////////////
  246. /////////////////////////////////////////////////////////////////////////////////////
  247. /*
  248.              Prohibido TOTALMENTE el Robo de Créditos o la
  249.                  Publicación de este FS sin Mi Permiso.
  250. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement