Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // OTACON
- // www.pawnoscripting.com
- //==============================================================================//
- //============[[FS] Crear Lomas de Burro (InGame)]==============//
- /*
- Instalacion:
- 1) Poner "LomasOtacon.amx y LomasOtacon.pwn" en la carpeta filterscripts.
- 2) Abrir server.cfg y añádase "LomasOtacon" a la línea filterscript.
- 3) Siga los pasos InGame.
- Listo, A Crear Lomas!. ;)
- */
- //===========================[INCLUDEs]========================//
- #include <a_samp>
- #include <core>
- #include <float>
- #include <gl_common>
- #pragma tabsize 0
- //=============================[NEWs]===========================//
- new Text:TexLOMAS;
- new CreatedLomas[200];
- new CreatedLoma = 0;
- new Text:RandomOtacon;
- new MensajesRandom[][] =
- {
- "~w~- <CREAR LOMAS DE BURRO> - ~g~<InGame> - ~y~By Otacon -", //Maximo 50 Caracteres.
- "~g~- <CREAR LOMAS DE BURRO> - ~w~<InGame> - ~y~By Otacon -",
- "~w~- <CREAR LOMAS DE BURRO> - ~g~<InGame> - ~y~By Otacon -"
- };
- //============[[FS] Crear Lomas de Burro (InGame)]==============//
- public OnFilterScriptInit()
- {
- TexLOMAS = TextDrawCreate(481.000000,171.000000,"~y~ - Crear Lomas de Burro ~y~In-Game - ~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 ~]~");
- TextDrawUseBox(TexLOMAS,1);
- TextDrawBoxColor(TexLOMAS,0x0000155);
- TextDrawTextSize(TexLOMAS,630.000000,250.000000);
- TextDrawAlignment(TexLOMAS,0);
- TextDrawBackgroundColor(TexLOMAS,0x000000ff);
- TextDrawFont(TexLOMAS,1);
- TextDrawLetterSize(TexLOMAS,0.260000,1.200000);
- TextDrawColor(TexLOMAS,0xffffffff);
- TextDrawSetOutline(TexLOMAS,1);
- TextDrawSetProportional(TexLOMAS,1);
- TextDrawSetShadow(TexLOMAS,1);
- RandomOtacon = TextDrawCreate(38.000000, 428.000000,"-_-");
- TextDrawAlignment(RandomOtacon,0);
- TextDrawBackgroundColor(RandomOtacon,0x000000ff);
- TextDrawFont(RandomOtacon,1);
- TextDrawLetterSize(RandomOtacon,0.430000, 1.400000);
- TextDrawColor(RandomOtacon,0xffffffff);
- TextDrawSetOutline(RandomOtacon,1);
- TextDrawSetProportional(RandomOtacon,1);
- TextDrawSetShadow(RandomOtacon,1);
- SetTimer("RandomMessageTimer",500,1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- //============[[FS] Crear Lomas de Burro (InGame)]==============//
- main()
- {
- print(" ");
- print(" ||||||| ");
- print(" \\ - - // ");
- print(" ( @ @ ) ");
- print(" +--oOOo-(_)-------------------+");
- print(" | [FS] Crear Lomas de Burro |");
- print(" | - (InGame) - |");
- print(" | CREADO POR: OTACON |");
- print(" | www.pawnoscripting.com |");
- print(" +--------------------oOOo-----+");
- }
- //============[[FS] Crear Lomas de Burro (InGame)]==============//
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, TexLOMAS);
- TextDrawShowForPlayer(playerid, RandomOtacon);
- return 1;
- }
- //============[[FS] Crear Lomas de Burro (InGame)]==============//
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new string[256];
- new cmd[256], idx;
- new tmp[256];
- cmd = strtok(cmdtext, idx);
- tmp = strtok(cmdtext, idx);
- //============[[FS] Crear Lomas de Burro (InGame)]==============//
- if(strcmp(cmd, "/Loma", true) == 0) {
- if(!strlen(tmp)) {
- SendClientMessage(playerid, 0xFFFFFFFF, "[ ! ] Usa: /Loma {Nombre}");
- return 1;
- }
- new Float:X, Float:Y, Float:Z;
- new Float:rx, Float:ry, Float:rz;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, rz);
- new Loma = CreateObject(13640, X, Y, Z-1.9, 0.0, 0.0, rz+180);
- CreatedLomas[CreatedLoma] = Loma;
- CreatedLoma++;
- if(!strlen(tmp)){SendClientMessage(playerid, 0xC6C6C8FF, "");return 1;}
- new nombre[32]; strmid(nombre, tmp, 0, strlen(tmp), sizeof(nombre));
- new File:file;
- format(string,sizeof(string),"%s.txt",nombre);
- file = fopen(string, io_append);
- fwrite(file,"//=======================================================================\r\n");
- fwrite(file, " [FS] Crear Lomas de Burro (InGame). By Otacon \r\n");
- fwrite(file,"//=======================================================================\r\n");
- fwrite(file," Agregar en OnGameModeInit() o en OnFilterScriptInit(): \r\n\r\n");
- format(string, sizeof string, " CreateObject(13640,%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);
- fwrite(file,string);
- fwrite(file,"//=======================================================================\r\n//*\r\n");
- fclose(file);
- SendClientMessage(playerid, 0x009400FF, "[ ! ] Se Ha Creado y Guardado con Exito La Loma de Burro en /scriptfiles");
- return 1;
- }
- //============[[FS] Crear Lomas de Burro (InGame)]==============//
- // Borrar TextDraw.
- if (strcmp("/Borrar", cmdtext, true, 10) == 0)
- {
- TextDrawHideForPlayer(playerid, TexLOMAS);
- TextDrawHideForPlayer(playerid, RandomOtacon);
- return 1;
- }
- //============[[FS] Crear Lomas de Burro (InGame)]==============//
- // Poner de Nuevo el TextDraw.
- if (strcmp("/Info", cmdtext, true, 10) == 0)
- {
- TextDrawShowForPlayer(playerid, TexLOMAS);
- TextDrawShowForPlayer(playerid, RandomOtacon);
- return 1;
- }
- //============[[FS] Crear Lomas de Burro (InGame)]==============//
- // Quitar Todas las Lomas Colocadas.
- if (strcmp("/QuitarLomas", cmdtext, true, 10) == 0)
- {
- for(new i = 0; i <= CreatedLomas[i]; i++) DestroyObject(CreatedLomas[i]);
- SendClientMessage(playerid, 0xC6C6C8FF, "[ ! ] Has Quitado Todas las Lomas de Burro.");
- return 1;
- }
- return 0;
- }
- //============[[FS] Crear Lomas de Burro (InGame)]==============//
- forward RandomMessageTimer();
- public RandomMessageTimer()
- {
- TextDrawSetString(RandomOtacon, MensajesRandom[random(sizeof(MensajesRandom))]);
- return 1;
- }
- //==============================================================//
- // OTACON
- // www.pawnoscripting.com
- //============[[FS] Crear Lomas de Burro (InGame)]==============//
- //==============================================================================//
Advertisement
Add Comment
Please, Sign In to add comment