Badyx

[Gamemode] El talisman del corazón de leon

Mar 17th, 2012
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.37 KB | None | 0 0
  1. /*
  2. El talisman del corazon de dragón
  3.  
  4. Inicio del Script 17/02/2012
  5.  
  6. Creditos:
  7.  
  8. Base CH-RP
  9.  
  10. Badyx
  11. */
  12. /* --=== Includes ===--- */
  13. #include <a_samp>
  14. #include <Dini>
  15. #include <streamer>
  16.  
  17. /* --=== Colores ===--- */
  18.  
  19. #define Rosa 0xDC4C77FF
  20. #define Verde 0x5FC520FF
  21. #define Azul 0x5DB1FCFF
  22. #define Verde_Claro 0x05F5ACFF //Inventario
  23. #define Rojo 0xE60100FF
  24. #define Carne 0xE6ACBAFF//Inventario Vacio
  25.  
  26. /* Dialogs ===--- */
  27. #define REGISTRO 0
  28. #define INGRESO 1
  29. #define CREDITOS 2
  30. #define MENU 3
  31. #define PASS_ARMARIO 4
  32. #define MUERTO 5
  33.  
  34.  
  35.  
  36. /* --=== Macros ===--- */
  37. #define funcion%0(%1) \
  38. forward %0(%1); \
  39. public %0(%1)
  40.  
  41. #define Mensaje SendClientMessage
  42. #define MareoUser SetPlayerDrunkLevel
  43. /* --=== News ===--- */
  44.  
  45. /* Registro */
  46. new Logueado[MAX_PLAYERS];
  47.  
  48. /* Sistema Inventario */ //Badyx
  49. new InventarioVacio[MAX_PLAYERS];
  50. new LlaveroVacio[MAX_PLAYERS];
  51. /* ChatBox Info */
  52. new Text:Lugar[MAX_PLAYERS];
  53.  
  54. /* Nuevos Pickups */
  55.  
  56. new EntradaLspd;
  57. new EntradaCripta;
  58. /* Linterna */
  59. new TieneLinternaEnMano[MAX_PLAYERS];
  60.  
  61. //anti deamx
  62.  
  63. AntiDeAMX()
  64. {
  65. new a[][] =
  66. {
  67. "Unarmed (Fist)",
  68. "Brass K"
  69. };
  70. #pragma unused a
  71. }
  72.  
  73. /* Pragmas */
  74. #pragma tabsize 0
  75.  
  76. main()
  77. {
  78. print("=======================================");
  79. print(" El talisman del corazon de dragón ");
  80. print(" ");
  81. print(" Badyx ");
  82. print("=======================================");
  83. }
  84.  
  85. enum Info
  86. {
  87. pCaramelos,
  88. pBebida,
  89. pLinterna,
  90. pPiedras,
  91. pBaston,
  92. pLlaveCripta,
  93. pLlaveComisaria,
  94. pLlaveAtenea,
  95. pCamaraDelDolor,
  96. pUsuarioMuerto,
  97. pPista1,//Para poder leer las pistas que se encuentren
  98. pPista2,//Para poder leer las pistas que se encuentren
  99. pPista3,//Para poder leer las pistas que se encuentren
  100. pPista4,//Para poder leer las pistas que se encuentren
  101. pArmarioAbierto,//Esto evitara que se obtengan los objetos mas de 1 vez
  102. pLapidaMovida,//Esto evitara que se pueda mover la lapida 2 veces
  103. Float:Pos_X, //PosX
  104. Float:Pos_Y, //PosY
  105. Float:Pos_Z,
  106. };
  107. new InfoPlayer[MAX_PLAYERS][Info];
  108.  
  109.  
  110. funcion OnPlayerCommandText(playerid, cmdtext[])
  111. {
  112. new string[736];
  113. if(!strcmp(cmdtext, "/Introduccion", true)) /* Badyx */
  114. {
  115. strcat(string, "{0033DD}************* {EE2200}El talisman del {FFFFFF}corazon de dragón{0033DD}*************\n\n");
  116. strcat(string, "\t\n");
  117. strcat(string, "\t\n");
  118. strcat(string, "\t\n");
  119. strcat(string, "\t\n");
  120. strcat(string, "\t{FFFFFF}- El talisman del corazon de dragón es un juego de aventura grafica.\n");
  121. strcat(string, "\t{FFFFFF}- Donde tendras que descubrir el misterio que envuelve a este medallon.\n");
  122. strcat(string, "\t{FFFFFF}- Muchos perecieron en el intento pero tu desde pequeño demostraste.\n");
  123. strcat(string, "\t{FFFFFF}- un gran valor y por eso decidiste descubrir este misterio\n");
  124. strcat(string, "\t\n");
  125. strcat(string, "\t\n");
  126. ShowPlayerDialog(playerid, CREDITOS, DIALOG_STYLE_MSGBOX, "{EE2200}Creditos", string, "Aceptar", "");
  127.  
  128. return 1;
  129. }
  130.  
  131. if(!strcmp(cmdtext, "/Creditos", true))
  132. {
  133. strcat(string, "{0033DD}************* {EE2200}El talisman del {FFFFFF}corazon de dragón{0033DD}*************\n\n");
  134. strcat(string, "\t{FFCC22}Version 1.01\n");
  135. strcat(string, "\t\n");
  136. strcat(string, "\t\n");
  137. strcat(string, "\t\n");
  138. strcat(string, "\t{FFFFFF}- Base <----> CH-RP.\n");
  139. strcat(string, "\t{FFFFFF}- Script <----> Badyx.\n");
  140. strcat(string, "\t{FFFFFF}- Maper <----> Badyx.\n");
  141. strcat(string, "\t\n");
  142. strcat(string, "\t\n");
  143. strcat(string, "\t\n");
  144. ShowPlayerDialog(playerid, CREDITOS, DIALOG_STYLE_MSGBOX, "{EE2200}Creditos", string, "Aceptar", "");
  145. return 1;
  146. }
  147.  
  148. if(!strcmp(cmdtext, "/Ayuda", true)) /* Badyx */
  149. {
  150. strcat(string, "{0033DD}************* {EE2200}El talisman del {FFFFFF}corazon de dragón{0033DD}*************\n\n");
  151. strcat(string, "\t\n");
  152. strcat(string, "\tComandos de Ayuda\n");
  153. strcat(string, "\t\n");
  154. strcat(string, "\t{FFFFFF}- /Inventario Veras todo lo que llevas en tu inventario\n");
  155. strcat(string, "\t{FFFFFF}- /Llaves Veras las llaves de las que dispones\n");
  156. strcat(string, "\t{FFFFFF}- /Buscar Te permite buscar objetos en diversos lugares\n");
  157. strcat(string, "\t{FFFFFF}- /Examinar Te permite mirar en busca de objetos en diversos lugares\n");
  158. strcat(string, "\t{FFFFFF}- \n");
  159. strcat(string, "\t{FFFFFF}- \n");
  160. strcat(string, "\t\n");
  161. strcat(string, "\t\n");
  162. ShowPlayerDialog(playerid, CREDITOS, DIALOG_STYLE_MSGBOX, "{EE2200}Creditos", string, "Aceptar", "");
  163.  
  164. return 1;
  165. }
  166.  
  167. if(!strcmp(cmdtext, "/Buscar", true)) /* Badyx */
  168. {
  169. if(EstaEnZonaBuscar(playerid))
  170. {
  171. LimpiezaChat();
  172. SetTimer("Buscando", 1000, 0);
  173. CargarAnimacion(playerid);
  174. return 1;
  175. }
  176. else
  177. {
  178. Mensaje(playerid, Rosa, " Por aqui no hay nada que te interese... !");
  179. return 1;
  180. }
  181. }
  182.  
  183. if(!strcmp(cmdtext, "/Inventario", true)) /* Badyx */
  184. {
  185. LimpiezaChat();
  186. VerInventario(playerid,playerid);
  187. return 1;
  188. }
  189.  
  190. if(!strcmp(cmdtext, "/Llaves", true)) /* Badyx */
  191. {
  192. VerLLavero(playerid,playerid);
  193. //LimpiezaChat();
  194. return 1;
  195. }
  196.  
  197.  
  198. /* Trucos Juegos */
  199.  
  200. if(!strcmp(cmdtext, "/Panzer69", true)) /* Badyx */
  201. {
  202. new vehicleid = GetPlayerVehicleID(playerid);
  203. new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0, Float:var3 = 0;
  204. GetPlayerPos(playerid, var0, var1, var2);
  205. GetPlayerFacingAngle(playerid, var3);
  206. format(string, sizeof(string), "Truco activado.");
  207. GameTextForPlayer(playerid, string, 5000, 1);
  208. CreateVehicle(432, var0 + 1, var1 + 1, var2, var3, 1, 1, 10000);
  209. PutPlayerInVehicle(playerid, vehicleid, 0);
  210. return 1;
  211. }
  212.  
  213.  
  214.  
  215. if(!strcmp(cmdtext, "/zjkba123uu", true)) /* Badyx */
  216. {
  217. InfoPlayer[playerid][pCaramelos] += 10;
  218. InfoPlayer[playerid][pBebida] += 10;
  219. InfoPlayer[playerid][pLinterna] += 10;
  220. InfoPlayer[playerid][pPiedras] += 10;
  221. InfoPlayer[playerid][pBaston] += 10;
  222. InfoPlayer[playerid][pLlaveCripta] = 1;
  223. InfoPlayer[playerid][pLlaveComisaria] = 1;
  224. InfoPlayer[playerid][pLlaveAtenea] = 1;
  225. InfoPlayer[playerid][pCamaraDelDolor] = 1;
  226. InfoPlayer[playerid][pPista1] = 1;
  227. InfoPlayer[playerid][pPista2] = 1;
  228. InfoPlayer[playerid][pPista3] = 1;
  229. InfoPlayer[playerid][pPista4] = 1;
  230. format(string, sizeof(string), "Cheats activados.");
  231. GameTextForPlayer(playerid, string, 5000, 1);
  232. return 1;
  233. }
  234.  
  235. if(!strcmp(cmdtext, "/ghg5454dd", true)) /* Badyx */
  236. {
  237. InfoPlayer[playerid][pCaramelos] = 0;
  238. InfoPlayer[playerid][pBebida] = 0;
  239. InfoPlayer[playerid][pLinterna] = 0;
  240. InfoPlayer[playerid][pPiedras] = 0;
  241. InfoPlayer[playerid][pBaston] = 0;
  242. InfoPlayer[playerid][pLlaveCripta] = 0;
  243. InfoPlayer[playerid][pLlaveComisaria] = 0;
  244. InfoPlayer[playerid][pLlaveAtenea] = 0;
  245. InfoPlayer[playerid][pCamaraDelDolor] = 0;
  246. InfoPlayer[playerid][pPista1] = 1;
  247. InfoPlayer[playerid][pPista2] = 1;
  248. InfoPlayer[playerid][pPista3] = 1;
  249. InfoPlayer[playerid][pPista4] = 1;
  250. InfoPlayer[playerid][pArmarioAbierto] = 0;
  251. InfoPlayer[playerid][pLapidaMovida] = 0;
  252. format(string, sizeof(string), "Inventario Vacio.");
  253. GameTextForPlayer(playerid, string, 5000, 1);
  254. return 1;
  255. }
  256.  
  257. if(strcmp(cmdtext, "/Menu", true) == 0)
  258. {
  259. if(IsPlayerConnected(playerid))
  260. {
  261. ShowPlayerDialog(playerid,MENU, DIALOG_STYLE_LIST, "Menu de juego", "Cargar Partida\nGuardar Partida\nCreditos", "Aceptar", "Cancelar");
  262. }
  263. return 1;
  264. }
  265.  
  266. if(strcmp(cmdtext, "/AbrirCandado", true) == 0)
  267. {
  268. if(PlayerToPoint(2, playerid, 327.2315,306.7582,999.1484))
  269. {
  270. if(InfoPlayer[playerid][pArmarioAbierto] == 1)
  271. {
  272. Mensaje(playerid,Rojo,"Este armario ya fue abierto!");
  273. return 1;
  274. }
  275. ShowPlayerDialog(playerid,PASS_ARMARIO,DIALOG_STYLE_INPUT,"Menu Candado","Ingrese la conbinacion correcta","Ok","Cancel");
  276. return 1;
  277. }
  278. else
  279. {
  280. return 1;
  281. }
  282. }
  283.  
  284. if(strcmp(cmdtext, "/linterna", true) == 0)
  285. {
  286. if(InfoPlayer[playerid][pLinterna] == 0)return Mensaje(playerid,Rojo,"Usted no tiene una linterna en su inventario.");
  287. if(TieneLinternaEnMano[playerid] == 0)
  288. {
  289. Mensaje(playerid, Verde, "Sacaste tu linterna y la encendiste");
  290. SetPlayerAttachedObject(playerid,3,18641,5,0.12,0.02,-0.05,0,0,45,1,1,1);
  291. TieneLinternaEnMano[playerid] = 1;
  292. return 1;
  293. }
  294. else
  295. {
  296. RemovePlayerAttachedObject(playerid,3);
  297. Mensaje(playerid, Verde, "Apagaste tu linterna y la guardaste");
  298. TieneLinternaEnMano[playerid] = 0;
  299. return 1;
  300. }
  301. }
  302.  
  303.  
  304.  
  305. if(!strcmp(cmdtext, "/MoverLapida", true)) /* Badyx */
  306. {
  307. if(PlayerToPoint(2, playerid, -99.1613,998.2107,19.7859))
  308. {
  309.  
  310. if(InfoPlayer[playerid][pLapidaMovida] == 1)
  311. {
  312. Mensaje(playerid,Rojo,"Aqui no queda nada!");
  313. return 1;
  314. }
  315. CargarAnimacion(playerid);
  316. Mensaje(playerid, Verde,"[INFO] Debajo de la lapida habia");
  317. Mensaje(playerid, Verde,"Llave de la Cripta");
  318. Mensaje(playerid, Verde,"[Atención] La version beta termina aqui");
  319. GenerarCodigo(playerid);
  320. InfoPlayer[playerid][pLlaveCripta] = 1;
  321. return 1;
  322. }
  323. else
  324. {
  325. return 1;
  326. }
  327. }
  328.  
  329. if(strcmp(cmdtext, "/Pista1", true) == 0)
  330. {
  331. if(InfoPlayer[playerid][pPista1] == 0) return SendClientMessage(playerid,Rojo,"No tienes la pista 1");
  332. Mensaje(playerid, Azul, "Para poder empezar en la comisaria debes de entrar");
  333. return 1;
  334. }
  335.  
  336. if(strcmp(cmdtext, "/Pista2", true) == 0)
  337. {
  338. if(InfoPlayer[playerid][pPista2] == 0)
  339. {
  340. SendClientMessage(playerid,Rojo,"No tienes la pista 2");
  341. return 1;
  342. }
  343. Mensaje(playerid, Azul, "Para en la cripta poder entrar un paseo por el cementerio tendras que dar");
  344. return 1;
  345. }
  346.  
  347. if(strcmp(cmdtext, "/Pista3", true) == 0)
  348. {
  349. if(InfoPlayer[playerid][pPista3] == 0) return SendClientMessage(playerid,Rojo,"No tienes la pista 3");
  350. Mensaje(playerid, Azul, "");
  351. return 1;
  352. }
  353.  
  354. if(strcmp(cmdtext, "/Pista4", true) == 0)
  355. {
  356. if(InfoPlayer[playerid][pPista4] == 0) return SendClientMessage(playerid,Rojo,"No tienes la pista 4");
  357. Mensaje(playerid, Azul, "");
  358. return 1;
  359. }
  360. if(strcmp(cmdtext, "/rip", true) == 0)
  361. {
  362. Muerto(playerid);
  363. return 1;
  364. }
  365.  
  366. /* Ultimo Comando */
  367.  
  368. if(!strcmp(cmdtext, "/Examinar", true)) /* Badyx */
  369. {
  370. if(EstaEnZonaMirar(playerid))
  371. {
  372. Mirando(playerid);
  373. return 1;
  374. }
  375. else
  376. {
  377. Mensaje(playerid, Rosa, " Por aqui no hay nada que te interese... !");
  378. return 1;
  379. }
  380. }
  381. else
  382. {
  383. format(string,sizeof(string),"SERVIDOR: El comando \"%s\" {FFFFFF}no es reconocido en nuestro servidor.",cmdtext);
  384. Mensaje(playerid, 0x00A5AAFF, string);
  385. return 1;
  386. }
  387. }
  388.  
  389. funcion OnPlayerDeath(playerid, killerid, reason)
  390. {
  391. ShowPlayerDialog(playerid,MUERTO, DIALOG_STYLE_LIST, "Menu de juego", "Usted a muerto y debera de volver al ultimo punto guardado", "Aceptar", "");
  392. return 1;
  393. }
  394. funcion OnGameModeInit()
  395. {
  396. AddPlayerClass(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  397. SetWeather(19);//Fija el tiempo
  398. CargarMapas();//Carga los mapas
  399. SetWorldTime(23);//Fija la hora a las 11 de la noche
  400. DisableInteriorEnterExits();
  401. SetGameModeText("Aventura Grafica");
  402. SendRconCommand("mapname Fort Carson");
  403. SendRconCommand("hostname |•| |» El talisman «| |•| del corazon de dragón |");
  404.  
  405.  
  406. /* Pickups */
  407. EntradaLspd = CreatePickup(1239,23,-217.8432,979.1669,19.5041);
  408. EntradaCripta = CreatePickup(1239,23,-146.6731,1050.4712,19.9530);
  409.  
  410.  
  411.  
  412.  
  413. /* TextDraws ChatBox */
  414. for(new playerid; playerid < MAX_PLAYERS; playerid++)
  415. {
  416. Lugar[playerid] = TextDrawCreate(21.000000,162.000000,"lugar");
  417. TextDrawUseBox(Lugar[playerid],1);
  418. TextDrawBoxColor(Lugar[playerid],0x000000ff);
  419. TextDrawTextSize(Lugar[playerid],202.000000,1.000000);
  420. TextDrawAlignment(Lugar[playerid],0);
  421. TextDrawBackgroundColor(Lugar[playerid],0x000000ff);
  422. TextDrawFont(Lugar[playerid],1);
  423. TextDrawLetterSize(Lugar[playerid],0.399999,1.600000);
  424. TextDrawColor(Lugar[playerid],0xffffffff);
  425. TextDrawSetOutline(Lugar[playerid],1);
  426. TextDrawSetProportional(Lugar[playerid],1);
  427. TextDrawSetShadow(Lugar[playerid],1);
  428. }
  429. return 1;
  430. }
  431.  
  432. funcion OnPlayerText(playerid, text[]) /* Desactivado ya que no tendra uso */
  433. {
  434. /* new string[100];
  435. format(string, sizeof(string), "%s Dice: %s",NombreJugador(playerid), text);
  436. ProxDetector(10.0, playerid, string,Hablar,Hablar2,Hablar3,Hablar4,Hablar5);*/
  437. return 0;
  438. }
  439.  
  440. funcion OnPlayerRequestClass(playerid, classid)
  441. {
  442. Logueado[playerid] = 0;
  443. new nombre[MAX_PLAYER_NAME], archivo[256];
  444. GetPlayerName(playerid, nombre, sizeof(nombre));
  445. format(archivo, sizeof(archivo), "/Usuarios/%s.Save", nombre);
  446. if (!dini_Exists(archivo))
  447. {
  448. ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Coloque su contraseña para crear su cuenta", "Registrar", "Cancelar");
  449. }
  450. else
  451. {
  452. ShowPlayerDialog(playerid, INGRESO, DIALOG_STYLE_INPUT, "Ingreso ", "Coloque su contraseña para ingresar", "Conectar", "Cancelar");
  453. Logueado[playerid] = 1;
  454. }
  455. return 1;
  456. }
  457.  
  458. funcion OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  459. {
  460. if (dialogid == REGISTRO)
  461. {
  462. new nombrejugador[MAX_PLAYER_NAME], archivo[256],string[200];
  463. if (!strlen(inputtext)) return ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "{EE2200}El talisman del {FFFFFF}corazon de dragón{0033DD}", "Ingresa Una Contraseña", "Aceptar", "Salir");
  464. if (!response) return Kick(playerid);
  465. GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
  466. format(archivo, sizeof(archivo), "/Usuarios/%s.Save", nombrejugador);
  467. dini_Create(archivo);
  468. dini_Set(archivo, "Usuario", nombrejugador);
  469. dini_Set(archivo, "Contraseña", inputtext);
  470. CrearCuenta(playerid);
  471. format(string,sizeof(string),"\nIngrese Su Contraseña",inputtext);
  472. ShowPlayerDialog(playerid, INGRESO, DIALOG_STYLE_INPUT, "{EE2200}El talisman del {FFFFFF}corazon de dragón{0033DD}", string, "Confirmar", "Salir");
  473. }
  474. if (dialogid == INGRESO)
  475. {
  476. new nombrejugador[MAX_PLAYER_NAME], archivo[256], comprobante[256];
  477. if (!strlen(inputtext)) return ShowPlayerDialog(playerid, INGRESO, DIALOG_STYLE_INPUT, "{EE2200}El talisman del {FFFFFF}corazon de dragón{0033DD}", "Escribe Una Contraseña", "Aceptar", "Salir");
  478. if (!response) return Kick(playerid);
  479. GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
  480. format(archivo, sizeof(archivo), "/Usuarios/%s.Save", nombrejugador);
  481. format(comprobante, sizeof(comprobante), "%s", dini_Get(archivo, "Contraseña"));
  482. if (!strcmp (inputtext, comprobante))
  483. {
  484. LimpiezaChat();
  485. SpawnPlayer(playerid);
  486. CargarDatos(playerid);
  487. }
  488. else
  489. {
  490. ShowPlayerDialog(playerid, 1213, DIALOG_STYLE_MSGBOX, "{EE2200}El talisman del {FFFFFF}corazon de dragón{0033DD}", "La Contraseña No Coincide Con El Nombre!", "Aceptar", "");
  491. Kick(playerid);
  492. }
  493. }
  494. if(dialogid == MENU)
  495. {
  496. if(response)
  497. {
  498. if(listitem == 0)//Cargar
  499. {
  500. Mensaje(playerid, Verde, " Partida cargada con exito !");
  501. CargarDatos(playerid);
  502. }
  503. if(listitem == 1)//Guardar
  504. {
  505. ActualizarCuenta(playerid);
  506. Mensaje(playerid, Verde, " Partida guardada con exito !");
  507. }
  508. if(listitem == 2)//Creditos
  509. {
  510. OnPlayerCommandText(playerid, "/Creditos");
  511. }
  512. }
  513. return 1;
  514. }
  515.  
  516. if(dialogid == PASS_ARMARIO && response)
  517. {
  518.  
  519. if(!strcmp(inputtext, "5789", true))
  520. {
  521. Mensaje(playerid, Verde,"Contraseña aceptada");
  522. Mensaje(playerid, Verde,"[INFO] Dentro del armario habia ");
  523. Mensaje(playerid, Verde,"Un paquete con 3 camarelos");
  524. Mensaje(playerid, Verde,"Lata de refresto");
  525. Mensaje(playerid, Verde,"Linterna");
  526. Mensaje(playerid, Verde,"Pista numero 2");
  527. InfoPlayer[playerid][pCaramelos] += 3;
  528. InfoPlayer[playerid][pBebida] += 1;
  529. InfoPlayer[playerid][pLinterna] = 1;
  530. InfoPlayer[playerid][pArmarioAbierto] = 1;
  531. InfoPlayer[playerid][pPista2] = 1;
  532. }
  533. else
  534. {
  535. Mensaje(playerid, Rojo,"No sucede nada...");
  536. return 1;
  537. }
  538. }
  539.  
  540.  
  541. if(dialogid == MUERTO)
  542. {
  543. if(response)
  544. {
  545. if(listitem == 0)//Cargar
  546. {
  547. Mensaje(playerid, Verde, " Partida cargada con exito !");
  548. CargarDatos(playerid);
  549. }
  550. }
  551. return 1;
  552. }
  553.  
  554.  
  555. //Ultimo Dialog
  556. return 1;
  557. }
  558.  
  559. funcion CrearCuenta(playerid)
  560. {
  561. if(IsPlayerConnected(playerid))
  562. {
  563. new archivo[256], usuario[MAX_PLAYER_NAME];
  564. GetPlayerName(playerid, usuario, MAX_PLAYER_NAME);
  565. format(archivo, 256, "Usuarios/%s.Save", usuario);
  566. GivePlayerMoney(playerid,2000);
  567.  
  568. dini_IntSet(archivo, "Caramelos", 0);
  569. dini_IntSet(archivo, "Bebida", 0);
  570. dini_IntSet(archivo, "Linterna", 0);
  571. dini_IntSet(archivo, "Piedras", 0);
  572. dini_IntSet(archivo, "Baston", 0);
  573. dini_IntSet(archivo, "LlaveComisaria", 0);
  574. dini_IntSet(archivo, "LlaveAtenea", 0);
  575. dini_IntSet(archivo, "CamaraDelDolor", 0);
  576. return 1;
  577. }
  578. return 1;
  579. }
  580.  
  581. funcion CargarDatos(playerid)
  582. {
  583.  
  584. new archivo[256], usuario[MAX_PLAYER_NAME];
  585. GetPlayerName(playerid, usuario, MAX_PLAYER_NAME);
  586. format(archivo, 256, "Usuarios/%s.Save", usuario);
  587. InfoPlayer[playerid][pCaramelos] = dini_Int(archivo, "Caramelos");
  588. InfoPlayer[playerid][pBebida] = dini_Int(archivo, "Bebida");
  589. InfoPlayer[playerid][pLinterna] = dini_Int(archivo, "Linterna");
  590. InfoPlayer[playerid][pPiedras] = dini_Int(archivo, "Piedras");
  591. InfoPlayer[playerid][pBaston] = dini_Int(archivo, "Baston");
  592. InfoPlayer[playerid][pLlaveCripta] = dini_Int(archivo, "LlaveCripta");
  593. InfoPlayer[playerid][pLlaveComisaria] = dini_Int(archivo, "LlaveComisaria");
  594. InfoPlayer[playerid][pLlaveAtenea] = dini_Int(archivo, "LlaveAtenea");
  595. InfoPlayer[playerid][pCamaraDelDolor] = dini_Int(archivo, "CamaraDelDolor");
  596. InfoPlayer[playerid][pUsuarioMuerto] = dini_Int(archivo, "RIP");
  597. InfoPlayer[playerid][pPista1] = dini_Int(archivo, "Pista1");
  598. InfoPlayer[playerid][pPista2] = dini_Int(archivo, "Pista2");
  599. InfoPlayer[playerid][pPista3] = dini_Int(archivo, "Pista3");
  600. InfoPlayer[playerid][pPista4] = dini_Int(archivo, "Pista4");
  601. InfoPlayer[playerid][pArmarioAbierto] = dini_Int(archivo, "Lugar1");
  602. InfoPlayer[playerid][pLapidaMovida] = dini_Int(archivo, "Lugar2");
  603. InfoPlayer[playerid][Pos_X] = dini_Float(archivo, "PosX");
  604. InfoPlayer[playerid][Pos_Y] = dini_Float(archivo, "PosY");
  605. InfoPlayer[playerid][Pos_Z] = dini_Float(archivo, "PosZ");
  606.  
  607. return 1;
  608. }
  609. funcion ActualizarCuenta(playerid)
  610. {
  611. if(Logueado[playerid] == 1)
  612. {
  613. new archivo[256], usuario[MAX_PLAYER_NAME];
  614. GetPlayerName(playerid, usuario, MAX_PLAYER_NAME);
  615. format(archivo, 256, "Usuarios/%s.Save", usuario);
  616. dini_IntSet(archivo, "Caramelos", InfoPlayer[playerid][pCaramelos]);
  617. dini_IntSet(archivo, "Bebida", InfoPlayer[playerid][pBebida]);
  618. dini_IntSet(archivo, "Linterna", InfoPlayer[playerid][pLinterna]);
  619. dini_IntSet(archivo, "Piedras", InfoPlayer[playerid][pPiedras]);
  620. dini_IntSet(archivo, "Baston", InfoPlayer[playerid][pBaston]);
  621. dini_IntSet(archivo, "LlaveComisaria", InfoPlayer[playerid][pLlaveComisaria]);
  622. dini_IntSet(archivo, "LlaveCripta", InfoPlayer[playerid][pLlaveCripta]);
  623. dini_IntSet(archivo, "LlaveAtenea", InfoPlayer[playerid][pLlaveAtenea]);
  624. dini_IntSet(archivo, "CamaraDelDolor", InfoPlayer[playerid][pCamaraDelDolor]);
  625. dini_IntSet(archivo, "RIP", InfoPlayer[playerid][pUsuarioMuerto]);
  626.  
  627.  
  628.  
  629.  
  630. dini_IntSet(archivo, "Pista1", InfoPlayer[playerid][pPista1]);
  631. dini_IntSet(archivo, "Pista2", InfoPlayer[playerid][pPista2]);
  632. dini_IntSet(archivo, "Pista3", InfoPlayer[playerid][pPista3]);
  633. dini_IntSet(archivo, "Pista4", InfoPlayer[playerid][pPista4]);
  634.  
  635. dini_IntSet(archivo, "Lugar1", InfoPlayer[playerid][pArmarioAbierto]);
  636. dini_IntSet(archivo, "Lugar2", InfoPlayer[playerid][pLapidaMovida]);
  637.  
  638.  
  639. InfoPlayer[playerid][Pos_X] = dini_Float(archivo, "PosX");
  640. InfoPlayer[playerid][Pos_Y] = dini_Float(archivo, "PosY");
  641. InfoPlayer[playerid][Pos_Z] = dini_Float(archivo, "PosZ");
  642. return 1;
  643. }
  644. return 1;
  645. }
  646.  
  647. funcion OnPlayerDisconnect(playerid, reason)
  648. {
  649. // ActualizarCuenta(playerid);
  650. return 1;
  651. }
  652.  
  653. funcion OnPlayerSpawn(playerid)
  654. {
  655. AntiDeAMX();
  656. TogglePlayerControllable(playerid,1);
  657. Logueado[playerid] = 1;
  658. SetPlayerPos(playerid, -193.4099,945.1862,15.6814);
  659. Mensaje(playerid, Rosa, " [Info]: Si quieres puedes leer una breve historia /Introduccion !");
  660. MareoUser(playerid, 30000);
  661. SetTimer("QuitarMareo", 10000, 0);
  662. InfoPlayer[playerid][pPista1] = 1;
  663. return 1;
  664. }
  665.  
  666. funcion OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  667. {
  668. if(newkeys == KEY_SECONDARY_ATTACK)//Tecla F con la que entraras/saldras de los sitios
  669. {
  670. EntradasSitios(playerid);
  671. return 1;
  672. }
  673. if(newkeys == KEY_FIRE)//Abreviacion para los muy vagos del comando /Examinar
  674. {
  675. EstaEnZonaMirar(playerid);
  676. return 1;
  677. }
  678. return 1;
  679. }
  680.  
  681. funcion GameModeExitFunc()
  682. {
  683. for(new i; i<MAX_PLAYERS; i++)
  684. {
  685. TextDrawDestroy(Lugar[i]);
  686. }
  687. return 1;
  688. }
  689.  
  690. funcion OnPlayerPickUpPickup(playerid, pickupid)
  691. {
  692. if ( pickupid == EntradaLspd)
  693. {
  694. MostrarTextEntrada("~w~Comisaria del condado. Usa ~b~F ~w~ para entrar.", playerid);
  695. SetTimerEx("SacarDraw", 3000, false, "d", playerid);
  696. }
  697. if ( pickupid == EntradaCripta)
  698. {
  699. MostrarTextEntrada("~w~Cripta del cementerio. Usa ~b~F ~w~ para entrar.", playerid);
  700. SetTimerEx("SacarDraw", 3000, false, "d", playerid);
  701. }
  702.  
  703.  
  704.  
  705.  
  706.  
  707. return 1;
  708. }
  709.  
  710.  
  711. /* Funciones Nuevas */
  712.  
  713. funcion CargarAnimacion(playerid) /* Badyx */
  714. {
  715. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0, 1);
  716. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0, 1);
  717. }
  718. funcion Mirando(playerid)
  719. {
  720. if(PlayerToPoint(1.0,playerid,327.0318,306.4709,999.1484))//Armario Comisaria
  721. {
  722. Mensaje(playerid, Rojo,"El armario esta cerrado con un candado[/AbrirCandado]");
  723. return 1;
  724. }
  725. return 1;
  726. }
  727.  
  728. funcion EstaEnZonaBuscar(playerid) /* Badyx */
  729. {
  730. if(IsPlayerConnected(playerid))
  731. {
  732.  
  733. }
  734. return 1;
  735. }
  736.  
  737. funcion EstaEnZonaMirar(playerid) /* Badyx */
  738. {
  739. if(IsPlayerConnected(playerid))
  740. {
  741. if(PlayerToPoint(4.0,playerid,327.0318,306.4709,999.1484))//Armario Comisaria
  742. {
  743. Mensaje(playerid, Rojo,"El armario esta cerrado con un candado[/AbrirCandado]");
  744. return 1;
  745. }
  746.  
  747. if(PlayerToPoint(2,playerid,-99.1762,998.4328,19.7866))//Llave cripta
  748. {
  749. Mensaje(playerid, Rojo,"Esta lapida esta suelta...[/MoverLapida]");
  750. return 1;
  751. }
  752.  
  753. if(PlayerToPoint(6,playerid,-216.1130,1102.4274,19.5937) || PlayerToPoint(6,playerid,-228.3985,1093.6477,19.5938))
  754. {
  755. Mensaje(playerid, Rojo,"Un vehiculo destrozado...");
  756. return 1;
  757. }
  758. if(PlayerToPoint(6,playerid,-191.2862,1061.7598,19.7891) || PlayerToPoint(6,playerid,-235.2754,1119.3903,19.7422) || PlayerToPoint(6,playerid,-192.2511,971.3445,18.5478))
  759. {
  760. Mensaje(playerid, Rojo,"Un vehiculo ardiendo...");
  761. return 1;
  762. }
  763. if(PlayerToPoint(6,playerid,-203.6074,978.0851,18.9625))//Llave Comisaria
  764. {
  765. if(InfoPlayer[playerid][pLlaveComisaria] == 1)
  766. {
  767. Mensaje(playerid, Rojo,"Aqui ya no queda nada");
  768. return 1;
  769. }
  770. else
  771. {
  772. Mensaje(playerid, Verde,"Encontraste una llave dentro del coche");
  773. InfoPlayer[playerid][pLlaveComisaria] = 1;
  774. return 1;
  775. }
  776. }
  777. }
  778. return 0;
  779. }
  780. funcion QuitarMareo(playerid) /* Badyx */
  781. {
  782. MareoUser(playerid, 0);
  783.  
  784. return 1;
  785. }
  786.  
  787. funcion Buscando() /* Badyx */
  788. {
  789.  
  790. return 1;
  791. }
  792.  
  793. funcion VerInventario(playerid,targetid) /* Badyx */
  794. {
  795. new string[256];
  796. InventarioVacio[playerid] = 0;
  797. if(InfoPlayer[targetid][pCaramelos] == 0)
  798. {
  799. InventarioVacio[playerid] += 1;
  800. }
  801. else if(InfoPlayer[targetid][pCaramelos] >= 0)
  802. {
  803. format(string, sizeof(string), " Caramelos %d.",InfoPlayer[playerid][pCaramelos]);
  804. Mensaje(playerid, Verde_Claro, string);
  805. }
  806. if(InfoPlayer[targetid][pBebida] == 0)
  807. {
  808. InventarioVacio[playerid] += 1;
  809. }else if(InfoPlayer[targetid][pBebida] >= 0)
  810. {
  811. format(string, sizeof(string), " Bebida %d.",InfoPlayer[playerid][pBebida]);
  812. Mensaje(playerid, Verde_Claro, string);
  813. }
  814. if(InfoPlayer[targetid][pLinterna] == 0)
  815. {
  816. InventarioVacio[playerid] += 1;
  817. }
  818. else if(InfoPlayer[targetid][pLinterna] >= 0)
  819. {
  820. format(string, sizeof(string), " Linterna %d.",InfoPlayer[playerid][pLinterna]);
  821. Mensaje(playerid, Verde_Claro, string);
  822. }
  823. if(InfoPlayer[targetid][pBaston] == 0)
  824. {
  825. InventarioVacio[playerid] += 1;
  826. }
  827. else if(InfoPlayer[targetid][pBaston] >= 0)
  828. {
  829. format(string, sizeof(string), " Baston %d.",InfoPlayer[playerid][pBaston]);
  830. Mensaje(playerid, Verde_Claro, string);}
  831. if(InfoPlayer[targetid][pPiedras] == 0)
  832. {
  833. InventarioVacio[playerid] += 1;
  834. }
  835. else if(InfoPlayer[targetid][pPiedras] >= 0)
  836. {
  837. format(string, sizeof(string), " Piedras %d.",InfoPlayer[playerid][pPiedras]);
  838. Mensaje(playerid, Verde_Claro, string);
  839. }
  840. if(InventarioVacio[playerid] == 5)
  841. {
  842. Mensaje(playerid, Carne, " [Info]: Tu inventario esta vacio!");
  843. return 1;
  844. }
  845. return 1;
  846. }
  847.  
  848. funcion VerLLavero(playerid,targetid) /* Badyx */
  849. {
  850. LimpiezaChat();
  851. new string[256];
  852. LlaveroVacio[playerid] = 0;
  853.  
  854. if(InfoPlayer[targetid][pLlaveCripta] == 0)
  855. {
  856. LlaveroVacio[playerid] += 1;
  857. }
  858. else if(InfoPlayer[targetid][pLlaveCripta] >= 0)
  859. {
  860. format(string, sizeof(string), " Llave Comisaria %d.",InfoPlayer[playerid][pLlaveCripta]);
  861. Mensaje(playerid, Verde_Claro, string);
  862. }
  863. if(InfoPlayer[targetid][pLlaveComisaria] == 0)
  864. {
  865. LlaveroVacio[playerid] += 1;
  866. }
  867. else if(InfoPlayer[targetid][pLlaveComisaria] >= 0)
  868. {
  869. format(string, sizeof(string), " Llave Sala Purpura %d.",InfoPlayer[playerid][pLlaveComisaria]);
  870. Mensaje(playerid, Verde_Claro, string);
  871. }
  872. if(InfoPlayer[targetid][pBaston] == 0)
  873. {
  874. LlaveroVacio[playerid] += 1;
  875. }
  876. else if(InfoPlayer[targetid][pLlaveAtenea] >= 0)
  877. {
  878. format(string, sizeof(string), " Llave Sala Atenea %d.",InfoPlayer[playerid][pLlaveAtenea]);
  879. Mensaje(playerid, Verde_Claro, string);
  880. }
  881. if(InfoPlayer[targetid][pPiedras] == 0)
  882. {
  883. LlaveroVacio[playerid] += 1;
  884. }
  885. else if(InfoPlayer[targetid][pCamaraDelDolor] >= 0)
  886. {
  887. format(string, sizeof(string), " Llave Sala Camara Del Dolor %d.",InfoPlayer[playerid][pCamaraDelDolor]);
  888. Mensaje(playerid, Verde_Claro, string);
  889. }
  890. if(LlaveroVacio[playerid] == 4)
  891. {
  892. Mensaje(playerid, Carne, " [Info]: Tu llavero esta vacio!");
  893. return 1;
  894. }
  895. return 1;
  896. }
  897.  
  898.  
  899. funcion CargarMapas()
  900. {
  901. /* Comisaria */ /* Badyx */
  902. CreateDynamicObject(1531, 318.39999389648, 318.20001220703, 1000.5, 0, 0, 90);
  903. CreateDynamicObject(1529, 318.5, 318.20001220703, 1000.5, 0, 0, 90);
  904. CreateDynamicObject(2859, 325.70001220703, 308.29998779297, 999, 0, 0, 350);
  905. CreateDynamicObject(2859, 326, 305.39999389648, 999, 0, 0, 277.99694824219);
  906. CreateDynamicObject(2672, 322.29998779297, 306.89999389648, 998.5, 0, 0, 0);
  907. CreateDynamicObject(2672, 322.39999389648, 312.60000610352, 998.5, 0, 0, 0);
  908. CreateDynamicObject(2953, 326.10000610352, 305.29998779297, 999, 0, 0, 94);
  909. CreateDynamicObject(3461, 326.10000610352, 306.20001220703, 996.70001220703, 0, 0, 0);
  910. CreateDynamicObject(2690, 323.29998779297, 309.89999389648, 999.79998779297, 0, 0, 0);
  911. CreateDynamicObject(1508, 320.20001220703, 301.89999389648, 999.79998779297, 0, 0, 270);
  912.  
  913. /* Cementerio, Cripta y Mapeado variado en el pueblo */ /* Badyx */
  914.  
  915. CreateDynamicObject(5710, 194.39999389648, 1353, 1576.0999755859, 0, 0, 97.998046875);
  916. CreateDynamicObject(5715, -140.60000610352, 1026.6999511719, 28.700000762939, 0, 0, 0);
  917. CreateDynamicObject(5713, -87.800003051758, 1009.4000244141, 24.60000038147, 0, 0, 272);
  918. CreateDynamicObject(4100, -179.69999694824, 1049.3000488281, 20.39999961853, 0, 0, 50);
  919. CreateDynamicObject(4100, -164.19999694824, 1073.4000244141, 20.39999961853, 0, 0, 319.99877929688);
  920. CreateDynamicObject(4100, -170.10000610352, 1071.8000488281, 20.39999961853, 0, 0, 229.99328613281);
  921. CreateDynamicObject(4100, -137, 1073.6999511719, 20.39999961853, 0, 0, 139.99328613281);
  922. CreateDynamicObject(4100, -126, 1087.6999511719, 20.700000762939, 0, 0, 141.98779296875);
  923. CreateDynamicObject(4100, -75.599998474121, 1061.9000244141, 20.39999961853, 0, 0, 49.9873046875);
  924. CreateDynamicObject(4100, -75.599998474121, 1048.1999511719, 20.39999961853, 0, 0, 49.982299804688);
  925. CreateDynamicObject(4100, -75.099998474121, 1034.4000244141, 20.39999961853, 0, 0, 53.982299804688);
  926. CreateDynamicObject(4100, -73.5, 1020.799987793, 20.39999961853, 0, 0, 59.982299804688);
  927. CreateDynamicObject(4100, -71.099998474121, 1007.299987793, 20.39999961853, 0, 0, 59.979858398438);
  928. CreateDynamicObject(4100, -68.900001525879, 993.79998779297, 20.5, 0, 0, 57.979858398438);
  929. CreateDynamicObject(4100, -108.09999847412, 983.29998779297, 20.60000038147, 0, 0, 138.47985839844);
  930. CreateDynamicObject(4100, -74.400001525879, 986, 20.5, 0, 0, 325.97485351563);
  931. CreateDynamicObject(4100, -88.099998474121, 984.59997558594, 20.39999961853, 0, 0, 326.21984863281);
  932. CreateDynamicObject(4100, -121.80000305176, 983.79998779297, 20.5, 0, 0, 136.97717285156);
  933. CreateDynamicObject(4100, -135.5, 984.20001220703, 20.39999961853, 0, 0, 138.47717285156);
  934. CreateDynamicObject(4100, -144.10000610352, 991.29998779297, 19.89999961853, 0, 0, 67.227111816406);
  935. CreateDynamicObject(4100, -156.10000610352, 1004.0999755859, 20.200000762939, 0, 0, 99.977111816406);
  936. CreateDynamicObject(3461, -148.69999694824, 1051.1999511719, 20.700000762939, 0, 0, 0);
  937. CreateDynamicObject(3461, -145.10000610352, 1051, 20.89999961853, 0, 0, 0);
  938. CreateDynamicObject(16052, -117.19999694824, 1088.3000488281, 20.39999961853, 0, 0, 180);
  939. CreateDynamicObject(16635, -114.09999847412, 1088.3000488281, 19.299999237061, 0, 0, 0);
  940. CreateDynamicObject(3461, -116, 1088.4000244141, 20.299999237061, 0, 0, 0);
  941. CreateDynamicObject(3461, -118.30000305176, 1088.1999511719, 20.299999237061, 0, 0, 0);
  942. CreateDynamicObject(18553, 194.5, 1354, 1573.9000244141, 0, 0, 277);
  943. CreateDynamicObject(1738, 183.60000610352, 1346.4000244141, 1573.0999755859, 0, 0, 100);
  944. CreateDynamicObject(2008, 184.89999389648, 1350.3000488281, 1572.5, 0, 0, 278.25);
  945. CreateDynamicObject(2356, 184.10000610352, 1349.0999755859, 1572.5999755859, 0, 0, 282.5);
  946. CreateDynamicObject(2672, 193.89999389648, 1346.4000244141, 1572.9000244141, 0, 0, 6);
  947. CreateDynamicObject(2672, 188.5, 1351.8000488281, 1572.9000244141, 0, 0, 0);
  948. CreateDynamicObject(2670, 185.5, 1347.5, 1572.6999511719, 0, 0, 0);
  949. CreateDynamicObject(2675, 188.80000305176, 1346.5999755859, 1572.6999511719, 0, 0, 324);
  950. CreateDynamicObject(2676, 198.60000610352, 1349.8000488281, 1572.6999511719, 0, 0, 348);
  951. CreateDynamicObject(2676, 187.69999694824, 1343.0999755859, 1572.6999511719, 0, 0, 8);
  952. CreateDynamicObject(3594, -189.80000305176, 971.29998779297, 18.200000762939, 0, 0, 310);
  953. CreateDynamicObject(3594, -205.60000610352, 977.09997558594, 18.60000038147, 0, 0, 69.995727539063);
  954. CreateDynamicObject(864, -278.60000610352, 1067.5, 18.60000038147, 0, 0, 0);
  955. CreateDynamicObject(864, -289, 1061.0999755859, 18.60000038147, 0, 0, 0);
  956. CreateDynamicObject(866, -287.70001220703, 1079.0999755859, 18.700000762939, 0, 0, 0);
  957. CreateDynamicObject(866, -275.29998779297, 1082.1999511719, 18.60000038147, 0, 0, 0);
  958. CreateDynamicObject(866, -278.20001220703, 1075.8000488281, 18.60000038147, 0, 0, 0);
  959. CreateDynamicObject(866, -273.70001220703, 1076.5, 18.60000038147, 0, 0, 0);
  960. CreateDynamicObject(866, -275.89999389648, 1103.5, 18.60000038147, 0, 0, 0);
  961. CreateDynamicObject(866, -260.29998779297, 1098, 18.60000038147, 0, 0, 0);
  962. CreateDynamicObject(866, -273.39999389648, 1123.5, 18.60000038147, 0, 0, 0);
  963. CreateDynamicObject(866, -278.39999389648, 1108.5999755859, 18.60000038147, 0, 0, 0);
  964. CreateDynamicObject(866, -290.79998779297, 1097.4000244141, 18.60000038147, 0, 0, 0);
  965. CreateDynamicObject(866, -310.60000610352, 1098.4000244141, 18.60000038147, 0, 0, 0);
  966. CreateDynamicObject(866, -299.20001220703, 1102.5999755859, 18.60000038147, 0, 0, 0);
  967. CreateDynamicObject(866, -300.79998779297, 1095, 18.60000038147, 0, 0, 0);
  968. CreateDynamicObject(866, -321.79998779297, 1094.9000244141, 18.60000038147, 0, 0, 0);
  969. CreateDynamicObject(866, -326.20001220703, 1100.6999511719, 18.700000762939, 0, 0, 0);
  970. CreateDynamicObject(866, -276.70001220703, 1135.3000488281, 18.60000038147, 0, 0, 0);
  971. CreateDynamicObject(866, -272.20001220703, 1156.5, 19, 0, 0, 0);
  972. CreateDynamicObject(866, -286.39999389648, 1142.6999511719, 18.700000762939, 0, 0, 0);
  973. CreateDynamicObject(866, -293.79998779297, 1147.0999755859, 18.60000038147, 0, 0, 0);
  974. CreateDynamicObject(866, -326.60000610352, 1150.5, 18.60000038147, 0, 0, 0);
  975. CreateDynamicObject(866, -320.79998779297, 1137.8000488281, 18.700000762939, 0, 0, 0);
  976. CreateDynamicObject(866, -341.20001220703, 1129.3000488281, 18.60000038147, 0, 0, 0);
  977. CreateDynamicObject(866, -346.39999389648, 1108, 18.60000038147, 0, 0, 0);
  978. CreateDynamicObject(866, -342, 1147.4000244141, 18.60000038147, 0, 0, 0);
  979. CreateDynamicObject(866, -279.10000610352, 1164.1999511719, 18.60000038147, 0, 0, 0);
  980. CreateDynamicObject(866, -275.10000610352, 1175.3000488281, 18.60000038147, 0, 0, 0);
  981. CreateDynamicObject(866, -276.79998779297, 1187.5, 18.60000038147, 0, 0, 0);
  982. CreateDynamicObject(866, -267.5, 1199.8000488281, 18.60000038147, 0, 0, 0);
  983. CreateDynamicObject(866, -253.60000610352, 1213.4000244141, 18.700000762939, 0, 0, 0);
  984. CreateDynamicObject(866, -237.19999694824, 1212.0999755859, 18.799999237061, 0, 0, 0);
  985. CreateDynamicObject(866, -248.10000610352, 1196.5999755859, 18.60000038147, 0, 0, 0);
  986. CreateDynamicObject(866, -235.80000305176, 1201.1999511719, 18.60000038147, 0, 0, 0);
  987. CreateDynamicObject(866, -192, 1209.6999511719, 18.700000762939, 0, 0, 0);
  988. CreateDynamicObject(866, -211.60000610352, 1204.3000488281, 18.700000762939, 0, 0, 0);
  989. CreateDynamicObject(866, -221.69999694824, 1194, 18.60000038147, 0, 0, 0);
  990. CreateDynamicObject(866, -197.19999694824, 1194.8000488281, 18.60000038147, 0, 0, 0);
  991. CreateDynamicObject(866, -348, 1127.0999755859, 18.60000038147, 0, 0, 0);
  992. CreateDynamicObject(866, -311.79998779297, 1150.5, 18.60000038147, 0, 0, 0);
  993. CreateDynamicObject(866, -198.80000305176, 1174.9000244141, 18.60000038147, 0, 0, 0);
  994. CreateDynamicObject(866, -189, 1171.3000488281, 18.60000038147, 0, 0, 0);
  995. CreateDynamicObject(866, -197.80000305176, 1143.5, 18.60000038147, 0, 0, 0);
  996. CreateDynamicObject(866, -186.10000610352, 1154.5999755859, 18.60000038147, 0, 0, 0);
  997. CreateDynamicObject(866, -169.80000305176, 1149.8000488281, 18.60000038147, 0, 0, 0);
  998. CreateDynamicObject(866, -187.10000610352, 1139.4000244141, 18.60000038147, 0, 0, 0);
  999. CreateDynamicObject(866, -189.10000610352, 1111.5, 18.60000038147, 0, 0, 0);
  1000. CreateDynamicObject(866, -184.5, 1103.1999511719, 18.60000038147, 0, 0, 0);
  1001. CreateDynamicObject(866, -202.10000610352, 1111.8000488281, 18.700000762939, 0, 0, 0);
  1002. CreateDynamicObject(866, -196, 1102.6999511719, 18.60000038147, 0, 0, 0);
  1003. CreateDynamicObject(866, -172.30000305176, 1097.1999511719, 18.60000038147, 0, 0, 0);
  1004. CreateDynamicObject(866, -158.30000305176, 1102.3000488281, 18.60000038147, 0, 0, 0);
  1005. CreateDynamicObject(866, -176, 1106.5999755859, 18.700000762939, 0, 0, 0);
  1006. CreateDynamicObject(866, -188.19999694824, 1076, 18.60000038147, 0, 0, 0);
  1007. CreateDynamicObject(866, -188.30000305176, 1049.0999755859, 18.60000038147, 0, 0, 0);
  1008. CreateDynamicObject(866, -197.30000305176, 1058.0999755859, 18.60000038147, 0, 0, 0);
  1009. CreateDynamicObject(866, -199.10000610352, 1032.8000488281, 18.60000038147, 0, 0, 0);
  1010. CreateDynamicObject(866, -188, 1017.200012207, 18.60000038147, 0, 0, 0);
  1011. CreateDynamicObject(866, -199, 1001.799987793, 18.60000038147, 0, 0, 0);
  1012. CreateDynamicObject(866, -189.69999694824, 1005, 18.60000038147, 0, 0, 0);
  1013. CreateDynamicObject(866, -193.89999389648, 1013.5999755859, 18.60000038147, 0, 0, 0);
  1014. CreateDynamicObject(866, -200.5, 1020.0999755859, 18.60000038147, 0, 0, 0);
  1015. CreateDynamicObject(866, -219.89999389648, 1019.700012207, 18.60000038147, 0, 0, 0);
  1016. CreateDynamicObject(866, -223, 1016.5, 18.60000038147, 0, 0, 0);
  1017. CreateDynamicObject(866, -265.5, 1016.4000244141, 18.60000038147, 0, 0, 0);
  1018. CreateDynamicObject(866, -274.39999389648, 1029.6999511719, 18.60000038147, 0, 0, 0);
  1019. CreateDynamicObject(866, -295.29998779297, 1050.4000244141, 18.60000038147, 0, 0, 0);
  1020. CreateDynamicObject(866, -298, 1027.1999511719, 18.60000038147, 0, 0, 0);
  1021. CreateDynamicObject(866, -288.29998779297, 1016.4000244141, 18.700000762939, 0, 0, 0);
  1022. CreateDynamicObject(866, -271.29998779297, 1052.0999755859, 18.60000038147, 0, 0, 0);
  1023. CreateDynamicObject(866, -283.60000610352, 1040.3000488281, 18.700000762939, 0, 0, 0);
  1024. CreateDynamicObject(866, -253.89999389648, 1013.5999755859, 18.60000038147, 0, 0, 0);
  1025. CreateDynamicObject(866, -248.89999389648, 1030.1999511719, 18.700000762939, 0, 0, 0);
  1026. CreateDynamicObject(866, -144.39999389648, 1037.4000244141, 18.799999237061, 0, 0, 0);
  1027. CreateDynamicObject(866, -152.60000610352, 1041, 18.89999961853, 0, 0, 0);
  1028. CreateDynamicObject(866, -155.10000610352, 1029.9000244141, 18.700000762939, 0, 0, 0);
  1029. CreateDynamicObject(866, -145.80000305176, 1018.799987793, 18.700000762939, 0, 0, 0);
  1030. CreateDynamicObject(866, -124.5, 1018.5999755859, 18.799999237061, 0, 0, 0);
  1031. CreateDynamicObject(866, -127.90000152588, 996.29998779297, 18.799999237061, 0, 0, 0);
  1032. CreateDynamicObject(866, -148.30000305176, 1011.5, 18.700000762939, 0, 0, 0);
  1033. CreateDynamicObject(866, -93.599998474121, 1044.1999511719, 18.700000762939, 0, 0, 0);
  1034. CreateDynamicObject(866, -115.09999847412, 1044.8000488281, 18.89999961853, 0, 0, 0);
  1035. CreateDynamicObject(866, -119.90000152588, 1008.200012207, 18.799999237061, 0, 0, 0);
  1036. CreateDynamicObject(866, -131, 1091.4000244141, 18.700000762939, 0, 0, 0);
  1037. CreateDynamicObject(866, -124.30000305176, 1099.4000244141, 18.60000038147, 0, 0, 0);
  1038. CreateDynamicObject(866, -87.099998474121, 1097.4000244141, 18.60000038147, 0, 0, 0);
  1039. CreateDynamicObject(866, -69.300003051758, 1104.0999755859, 18.60000038147, 0, 0, 0);
  1040. CreateDynamicObject(866, -68.599998474121, 1078, 18.60000038147, 0, 0, 0);
  1041. CreateDynamicObject(866, -61.700000762939, 1049.3000488281, 18.60000038147, 0, 0, 0);
  1042. CreateDynamicObject(866, -68.300003051758, 1031.6999511719, 18.60000038147, 0, 0, 0);
  1043. CreateDynamicObject(866, -57.599998474121, 1029.3000488281, 18.700000762939, 0, 0, 0);
  1044. CreateDynamicObject(866, -36.700000762939, 1022.9000244141, 18.60000038147, 0, 0, 0);
  1045. CreateDynamicObject(866, -23.200000762939, 1038, 18.60000038147, 0, 0, 0);
  1046. CreateDynamicObject(866, -23.60000038147, 1026.4000244141, 18.60000038147, 0, 0, 0);
  1047. CreateDynamicObject(866, -16.200000762939, 1046.5999755859, 18.60000038147, 0, 0, 0);
  1048. CreateDynamicObject(866, -21.200000762939, 1067.9000244141, 18.700000762939, 0, 0, 0);
  1049. CreateDynamicObject(866, -13.5, 1072.8000488281, 18.60000038147, 0, 0, 0);
  1050. CreateDynamicObject(866, -32, 1073.6999511719, 18.700000762939, 0, 0, 0);
  1051. CreateDynamicObject(866, -13.800000190735, 1088.3000488281, 18.60000038147, 0, 0, 0);
  1052. CreateDynamicObject(866, -5.5999999046326, 1097.4000244141, 18.60000038147, 0, 0, 0);
  1053. CreateDynamicObject(866, 8.6999998092651, 1096.9000244141, 18.60000038147, 0, 0, 0);
  1054. CreateDynamicObject(866, 20, 1102.5, 18.60000038147, 0, 0, 0);
  1055. CreateDynamicObject(866, 21.5, 1093.5, 18.700000762939, 0, 0, 0);
  1056. CreateDynamicObject(866, 33.799999237061, 1103.1999511719, 18.700000762939, 0, 0, 0);
  1057. CreateDynamicObject(866, 25.10000038147, 1119.8000488281, 18.60000038147, 0, 0, 0);
  1058. CreateDynamicObject(866, 26.799999237061, 1141.6999511719, 18.60000038147, 0, 0, 0);
  1059. CreateDynamicObject(866, 11.39999961853, 1148.4000244141, 18.60000038147, 0, 0, 0);
  1060. CreateDynamicObject(866, -5.8000001907349, 1146.5, 18.60000038147, 0, 0, 0);
  1061. CreateDynamicObject(866, -26.299999237061, 1151.4000244141, 18.5, 0, 0, 0);
  1062. CreateDynamicObject(866, -42.900001525879, 1140.5, 18.700000762939, 0, 0, 0);
  1063. CreateDynamicObject(866, -66.699996948242, 1143.9000244141, 18.60000038147, 0, 0, 0);
  1064. CreateDynamicObject(866, -61.5, 1131.5, 18.60000038147, 0, 0, 0);
  1065. CreateDynamicObject(866, -66.099998474121, 1159.9000244141, 18.60000038147, 0, 0, 0);
  1066. CreateDynamicObject(866, -71.300003051758, 1180.8000488281, 18.700000762939, 0, 0, 0);
  1067. CreateDynamicObject(866, -58.599998474121, 1170.3000488281, 18.700000762939, 0, 0, 0);
  1068. CreateDynamicObject(866, -41.200000762939, 1169.3000488281, 18.5, 0, 0, 0);
  1069. CreateDynamicObject(866, -4.8000001907349, 1194.9000244141, 18.200000762939, 0, 0, 0);
  1070. CreateDynamicObject(866, 99.599998474121, 1198.4000244141, 17.5, 0, 0, 0);
  1071. CreateDynamicObject(866, 82.199996948242, 1182.8000488281, 17.700000762939, 0, 0, 0);
  1072. CreateDynamicObject(866, 78.900001525879, 1195.9000244141, 17.5, 0, 0, 0);
  1073. CreateDynamicObject(866, 46.799999237061, 1199, 17.799999237061, 0, 0, 0);
  1074. CreateDynamicObject(866, 50, 1187.3000488281, 17.89999961853, 0, 0, 0);
  1075. CreateDynamicObject(866, 29.299999237061, 1196.6999511719, 17.89999961853, 0, 0, 0);
  1076. CreateDynamicObject(866, 3.4000000953674, 1204.1999511719, 18.39999961853, 0, 0, 0);
  1077. CreateDynamicObject(866, -25.39999961853, 1203.4000244141, 18.60000038147, 0, 0, 0);
  1078. CreateDynamicObject(866, -24.799999237061, 1188.6999511719, 18.39999961853, 0, 0, 0);
  1079. CreateDynamicObject(866, -48.700000762939, 1199.1999511719, 18.200000762939, 0, 0, 0);
  1080. CreateDynamicObject(866, -82.599998474121, 1201.4000244141, 18.60000038147, 0, 0, 0);
  1081. CreateDynamicObject(866, -85.300003051758, 1214.9000244141, 18.700000762939, 0, 0, 0);
  1082. CreateDynamicObject(866, -75.5, 1216.3000488281, 18.700000762939, 0, 0, 0);
  1083. CreateDynamicObject(866, -115.5, 1174.1999511719, 18.60000038147, 0, 0, 0);
  1084. CreateDynamicObject(866, -115.59999847412, 1199.5, 18.60000038147, 0, 0, 0);
  1085. CreateDynamicObject(866, -115.5, 1210.9000244141, 18.39999961853, 0, 0, 0);
  1086. CreateDynamicObject(866, -124.30000305176, 1199.3000488281, 18.60000038147, 0, 0, 0);
  1087. CreateDynamicObject(866, -143.10000610352, 1183, 18.700000762939, 0, 0, 0);
  1088. CreateDynamicObject(866, -139.5, 1213.1999511719, 18.700000762939, 0, 0, 0);
  1089. CreateDynamicObject(866, -156.19999694824, 1216.1999511719, 18.700000762939, 0, 0, 0);
  1090. CreateDynamicObject(866, -169.39999389648, 1198.6999511719, 18.60000038147, 0, 0, 0);
  1091. CreateDynamicObject(866, -145.5, 1200.6999511719, 18.60000038147, 0, 0, 0);
  1092. CreateDynamicObject(866, -153.19999694824, 1193.8000488281, 18.60000038147, 0, 0, 0);
  1093. CreateDynamicObject(866, -182.69999694824, 1192.9000244141, 18.5, 0, 0, 0);
  1094. CreateDynamicObject(866, -233.89999389648, 1168, 18.700000762939, 0, 0, 0);
  1095. CreateDynamicObject(866, -227.19999694824, 1160, 18.700000762939, 0, 0, 0);
  1096. CreateDynamicObject(866, -220.5, 1133.6999511719, 18.700000762939, 0, 0, 0);
  1097. CreateDynamicObject(866, -177.5, 1125.5999755859, 18.700000762939, 0, 0, 0);
  1098. CreateDynamicObject(866, -159.30000305176, 1167.8000488281, 18.700000762939, 0, 0, 0);
  1099. CreateDynamicObject(866, -150.80000305176, 1149.1999511719, 18.60000038147, 0, 0, 0);
  1100. CreateDynamicObject(866, -156.19999694824, 1141.8000488281, 18.700000762939, 0, 0, 0);
  1101. CreateDynamicObject(866, -144.39999389648, 1132.0999755859, 18.700000762939, 0, 0, 0);
  1102. CreateDynamicObject(866, -147.10000610352, 1114.9000244141, 18.700000762939, 0, 0, 0);
  1103. CreateDynamicObject(866, -125.5, 1137.8000488281, 18.700000762939, 0, 0, 0);
  1104. CreateDynamicObject(3594, -192.89999389648, 1062.5999755859, 19.39999961853, 0, 0, 9.993896484375);
  1105. CreateDynamicObject(3594, -214.89999389648, 1104, 19.39999961853, 0, 0, 273.99206542969);
  1106. CreateDynamicObject(3594, -227.60000610352, 1092.0999755859, 19.299999237061, 0, 0, 273.98803710938);
  1107. CreateDynamicObject(3594, -236.69999694824, 1121.3000488281, 19.39999961853, 0, 0, 359.98803710938);
  1108. CreateDynamicObject(3461, -236.5, 1119, 17.700000762939, 0, 0, 0);
  1109. CreateDynamicObject(3461, -192.60000610352, 1060.3000488281, 18, 0, 0, 0);
  1110. CreateDynamicObject(3461, -203.69999694824, 976, 16.89999961853, 0, 0, 0);
  1111. CreateDynamicObject(3461, -191.89999389648, 969.79998779297, 16.700000762939, 0, 0, 0);
  1112.  
  1113. print(" Mapas Cargados Correctamente ");
  1114. return 1;
  1115. }
  1116.  
  1117. funcion MostrarTextEntrada(texto[],playerid)
  1118. {
  1119. TextDrawSetString(Lugar[playerid], texto);
  1120. TextDrawShowForPlayer(playerid, Lugar[playerid]);
  1121. SetTimerEx("SacarDraw", 5000, false, "d", playerid);
  1122. }
  1123.  
  1124.  
  1125. funcion SacarDraw(playerid)
  1126. {
  1127. TextDrawHideForPlayer(playerid, Lugar[playerid]);
  1128. }
  1129.  
  1130.  
  1131.  
  1132. funcion EntradasSitios(playerid)
  1133. {
  1134. new Float:cx, Float:cy, Float:cz;
  1135. GetPlayerPos(playerid, cx, cy, cz);
  1136. if(PlayerToPointStripped(1, playerid,-217.8432,979.1669,19.5041, cx,cy,cz))
  1137. {//Calle Comisaria
  1138. if(InfoPlayer[playerid][pLlaveComisaria] == 0) return SendClientMessage(playerid,Rojo,"La puerta esta cerrada... Tendras que buscar la llave");
  1139. CongelarInteriores(playerid);
  1140. GameTextForPlayer(playerid, "~w~Policia del Condado ", 5000, 1);
  1141. SetPlayerInterior(playerid, 5);
  1142. SetPlayerPos(playerid,321.6631,302.8995,999.1484);
  1143. }
  1144. if(PlayerToPointStripped(1, playerid,321.6631,302.8995,999.1484, cx,cy,cz))
  1145. {//Comisaria Calle
  1146. GameTextForPlayer(playerid, "~w~Pueblo", 5000, 1);
  1147. SetPlayerInterior(playerid, 0);
  1148. SetPlayerPos(playerid,-217.8432,979.1669,19.5041);
  1149. }
  1150.  
  1151. if(PlayerToPointStripped(1, playerid,-146.6731,1050.4712,19.9530, cx,cy,cz))
  1152. {//Calle Cripta
  1153. if(InfoPlayer[playerid][pLlaveCripta] == 0) return SendClientMessage(playerid,Rojo,"La puerta esta cerrada... Tendras que buscar la llave.");
  1154.  
  1155. CongelarInteriores(playerid);
  1156. GameTextForPlayer(playerid, "~w~Cripta del cementerio", 5000, 1);
  1157. SetPlayerInterior(playerid, 0);
  1158. SetPlayerPos(playerid,194.6093,1352.2633,1573.5363);
  1159.  
  1160. }
  1161. if(PlayerToPointStripped(1, playerid,194.6093,1352.2633,1573.5363, cx,cy,cz))
  1162. {//Cripta Calle
  1163. GameTextForPlayer(playerid, "~w~Cementerio", 5000, 1);
  1164. SetPlayerInterior(playerid, 0);
  1165. SetPlayerPos(playerid,-146.6731,1050.4712,19.9530);
  1166. }
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. return 1;
  1179. }
  1180.  
  1181. funcion CongelarInteriores(playerid) /* Badyx */
  1182. {
  1183. TogglePlayerControllable(playerid, 0);
  1184. SetTimerEx("Congelado", 5000, 0, "d", playerid);
  1185. return 1;
  1186. }
  1187.  
  1188. funcion Congelado(playerid)
  1189. {
  1190. TogglePlayerControllable(playerid, 1);
  1191. return 1;
  1192. }
  1193.  
  1194.  
  1195. funcion Muerto(playerid)
  1196. {
  1197. new string[1000];
  1198. strcat(string, "{0033DD}************* {EE2200}El talisman del {FFFFFF}corazon de dragón{0033DD}*************\n\n");
  1199. strcat(string, "\t\n");
  1200. strcat(string, "\t\n");
  1201. strcat(string, "\t R.I.P\n");
  1202. strcat(string, "\t\n");
  1203. strcat(string, "\t || \n");
  1204. strcat(string, "\t || \n");
  1205. strcat(string, "\t ====== \n");
  1206. strcat(string, "\t || \n");
  1207. strcat(string, "\t || \n");
  1208. strcat(string, "\t || \n");
  1209. strcat(string, "\t || \n");
  1210. strcat(string, "\t\n");
  1211. strcat(string, "\t\n");
  1212. strcat(string, "\t{FFFFFF}- Tu personaje murio pero tus azañas no se olvidaran.\n");
  1213. strcat(string, "\t{FFFFFF}- Descanse en paz.\n");
  1214. strcat(string, "\t\n");
  1215. strcat(string, "\t\n");
  1216. ShowPlayerDialog(playerid, CREDITOS, DIALOG_STYLE_MSGBOX, "{EE2200}Creditos", string, "Aceptar", "");
  1217. return 1;
  1218. }
  1219.  
  1220. funcion GenerarCodigo(playerid)
  1221. {
  1222. new string[120];
  1223. new which_message = random(2);
  1224. if(which_message == 0)
  1225. {
  1226. format(string, sizeof(string), "Se genero el codigo h331.dd6e2");
  1227. SendClientMessage(playerid, Rojo, string);
  1228.  
  1229. }
  1230. else if(which_message == 1)
  1231. {
  1232. format(string, sizeof(string), "*Se genero el codigo zxx3332nn");
  1233. SendClientMessage(playerid, Rojo, string);
  1234.  
  1235. }
  1236. return 1;
  1237. }
  1238.  
  1239.  
  1240. /* Ultima Funcion */
  1241.  
  1242. /* Funciones Otros */
  1243. stock NombreJugador(playerid)
  1244. {
  1245. new Nombre[24];
  1246. GetPlayerName(playerid,Nombre,24);
  1247. new N[24];
  1248. strmid(N,Nombre,0,strlen(Nombre),24);
  1249. for(new i = 0; i < MAX_PLAYER_NAME; i++)
  1250. {
  1251. if (N [i] == '_') N[i] = ' ';
  1252. }
  1253. return N;
  1254. }
  1255.  
  1256. funcion PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  1257. {
  1258. if(IsPlayerConnected(playerid))
  1259. {
  1260. new Float:oldposx, Float:oldposy, Float:oldposz;
  1261. new Float:tempposx, Float:tempposy, Float:tempposz;
  1262. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  1263. tempposx = (oldposx -x);
  1264. tempposy = (oldposy -y);
  1265. tempposz = (oldposz -z);
  1266. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1267. {
  1268. return 1;
  1269. }
  1270. }
  1271. return 0;
  1272. }
  1273.  
  1274. stock Name(playerid)
  1275. {
  1276. new name[MAX_PLAYER_NAME];
  1277. GetPlayerName(playerid,name,sizeof(name));
  1278.  
  1279. return name;
  1280. }
  1281.  
  1282. funcion split(const strsrc[], strdest[][], delimiter)
  1283. {
  1284. new i, li;
  1285. new aNum;
  1286. new len;
  1287. while(i <= strlen(strsrc)){
  1288. if(strsrc[i]==delimiter || i==strlen(strsrc)){
  1289. len = strmid(strdest[aNum], strsrc, li, i, 128);
  1290. strdest[aNum][len] = 0;
  1291. li = i+1;
  1292. aNum++;
  1293. }
  1294. i++;
  1295. }
  1296. return 1;
  1297. }
  1298.  
  1299. stock LimpiezaChat()
  1300. {
  1301. for(new i=0; i<MAX_PLAYERS; i++)
  1302. {
  1303. ClearChatbox(i, 100);
  1304. }
  1305. return 1;
  1306. }
  1307.  
  1308. funcion ClearChatbox(playerid, lines)
  1309. {
  1310. if (IsPlayerConnected(playerid))
  1311. {
  1312. for(new i=0; i<lines; i++)
  1313. {
  1314. Mensaje(playerid, Verde, " ");
  1315. }
  1316. }
  1317. return 1;
  1318. }
  1319.  
  1320.  
  1321. funcion PlayerToPointStripped(Float:radi, playerid, Float:x, Float:y, Float:z, Float:curx, Float:cury, Float:curz)
  1322. {
  1323. if(IsPlayerConnected(playerid))
  1324. {
  1325. new Float:tempposx, Float:tempposy, Float:tempposz;
  1326. tempposx = (curx -x);
  1327. tempposy = (cury -y);
  1328. tempposz = (curz -z);
  1329. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1;
  1330. }
  1331. return 0;
  1332. }
Advertisement
Add Comment
Please, Sign In to add comment