Advertisement
Guest User

MTS TextDraw By Ner0x

a guest
Mar 19th, 2011
840
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.01 KB | None | 0 0
  1. // FileScript By Ner0x.
  2. // Descripción: Es una script, que cuando matas a alguien saldrá en la pantalla bajo el chat.
  3.  
  4. #include <a_samp>
  5.  
  6. new Text:MTS;
  7.  
  8. public OnFilterScriptInit()
  9. {
  10. print("\n----------------------------------------");
  11. print(" Matanzas => Textdraw => Ner0x ... Cargado");
  12. print("------------------------------------------\n");
  13.  
  14. // Matanzas MTS
  15. MTS = TextDrawCreate(35.000000, 163.000000, "XXX ha matado a XXX con XX");
  16. TextDrawBackgroundColor(MTS, 255);
  17. TextDrawFont(MTS, 1);
  18. TextDrawLetterSize(MTS, 0.259999, 0.899999);
  19. TextDrawColor(MTS, -16776961);
  20. TextDrawSetOutline(MTS, 0);
  21. TextDrawSetProportional(MTS, 1);
  22. TextDrawSetShadow(MTS, 1);
  23. return 1;
  24. }
  25.  
  26. public OnPlayerDeath(playerid, killerid, reason)
  27. {
  28. new
  29. msg[128],
  30. killerName[MAX_PLAYER_NAME],
  31. reasonMsg[32],
  32. playerName[MAX_PLAYER_NAME];
  33.  
  34. GetPlayerName(killerid, killerName, sizeof(killerName));
  35. GetPlayerName(playerid, playerName, sizeof(playerName));
  36. if (killerid != INVALID_PLAYER_ID)
  37. {
  38. switch (reason)
  39. {
  40. case 0:
  41. {
  42. reasonMsg = "Manos";
  43. }
  44. case 1:
  45. {
  46. reasonMsg = "Brass Knuckles";
  47. }
  48. case 2:
  49. {
  50. reasonMsg = "Palo de Golf";
  51. }
  52. case 3:
  53. {
  54. reasonMsg = "Night Stick";
  55. }
  56. case 4:
  57. {
  58. reasonMsg = "Cuchillo";
  59. }
  60. case 5:
  61. {
  62. reasonMsg = "Bate";
  63. }
  64. case 6:
  65. {
  66. reasonMsg = "Ramo";
  67. }
  68. case 7:
  69. {
  70. reasonMsg = "Palo";
  71. }
  72. case 8:
  73. {
  74. reasonMsg = "Katana";
  75. }
  76. case 9:
  77. {
  78. reasonMsg = "Chainsaw";
  79. }
  80. case 10:
  81. {
  82. reasonMsg = "Dildo";
  83. }
  84. case 11:
  85. {
  86. reasonMsg = "Dildo";
  87. }
  88. case 12:
  89. {
  90. reasonMsg = "Vibrador";
  91. }
  92. case 13:
  93. {
  94. reasonMsg = "Vibrador";
  95. }
  96. case 14:
  97. {
  98. reasonMsg = "Flowers";
  99. }
  100. case 15:
  101. {
  102. reasonMsg = "Cane";
  103. }
  104. case 22:
  105. {
  106. reasonMsg = "Pistola 9m";
  107. }
  108. case 23:
  109. {
  110. reasonMsg = "Pistola Silenciada";
  111. }
  112. case 24:
  113. {
  114. reasonMsg = "Desert Eagle";
  115. }
  116. case 25:
  117. {
  118. reasonMsg = "Escopeta";
  119. }
  120. case 26:
  121. {
  122. reasonMsg = "Recortadas";
  123. }
  124. case 27:
  125. {
  126. reasonMsg = "Escopeta Combate";
  127. }
  128. case 28:
  129. {
  130. reasonMsg = "MAC-10";
  131. }
  132. case 29:
  133. {
  134. reasonMsg = "MP5";
  135. }
  136. case 30:
  137. {
  138. reasonMsg = "AK-47";
  139. }
  140. case 31:
  141. {
  142. if (GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  143. {
  144. switch (GetVehicleModel(GetPlayerVehicleID(killerid)))
  145. {
  146. case 447:
  147. {
  148. reasonMsg = "Sea Sparrow Machine Gun";
  149. }
  150. default:
  151. {
  152. reasonMsg = "Rifle de Asalto";
  153. }
  154. }
  155. }
  156. else
  157. {
  158. reasonMsg = "Rifle de Asalto";
  159. }
  160. }
  161. case 32:
  162. {
  163. reasonMsg = "MAC-10";
  164. }
  165. case 33:
  166. {
  167. reasonMsg = "Rifle";
  168. }
  169. case 34:
  170. {
  171. reasonMsg = "Francotirador";
  172. }
  173. case 37:
  174. {
  175. reasonMsg = "Fuego";
  176. }
  177. case 38:
  178. {
  179. if (GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  180. {
  181. switch (GetVehicleModel(GetPlayerVehicleID(killerid)))
  182. {
  183. case 425:
  184. {
  185. reasonMsg = "Helicoptero";
  186. }
  187. default:
  188. {
  189. reasonMsg = "Minigun";
  190. }
  191. }
  192. }
  193. else
  194. {
  195. reasonMsg = "Minigun";
  196. }
  197. }
  198. case 41:
  199. {
  200. reasonMsg = "Spray";
  201. }
  202. case 42:
  203. {
  204. reasonMsg = "Extintor";
  205. }
  206. case 49:
  207. {
  208. reasonMsg = "Chocandose";
  209. }
  210. case 50:
  211. {
  212. if (GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  213. {
  214. switch (GetVehicleModel(GetPlayerVehicleID(killerid)))
  215. {
  216. case 417, 425, 447, 465, 469, 487, 488, 497, 501, 548, 563:
  217. {
  218. reasonMsg = "Helices del Helicoptero";
  219. }
  220. default:
  221. {
  222. reasonMsg = "Chocandose";
  223. }
  224. }
  225. }
  226. else
  227. {
  228. reasonMsg = "Chocandose";
  229. }
  230. }
  231. case 51:
  232. {
  233. if (GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  234. {
  235. switch (GetVehicleModel(GetPlayerVehicleID(killerid)))
  236. {
  237. case 425:
  238. {
  239. reasonMsg = "Misiles de Hunter";
  240. }
  241. case 432:
  242. {
  243. reasonMsg = "Tanque";
  244. }
  245. case 520:
  246. {
  247. reasonMsg = "Hydra Avion";
  248. }
  249. default:
  250. {
  251. reasonMsg = "Explosion";
  252. }
  253. }
  254. }
  255. else
  256. {
  257. reasonMsg = "Explosión";
  258. }
  259. }
  260. default:
  261. {
  262. reasonMsg = "Arma Desconocida";
  263. }
  264. }
  265. format(msg, sizeof(msg), "%s ha matado a %s. (%s)", killerName, playerName, reasonMsg);
  266. }
  267. else
  268. {
  269. switch (reason)
  270. {
  271. case 53:
  272. {
  273. format(msg, sizeof(msg), "%s ha muerto Ahogado", playerName);
  274. }
  275. case 54:
  276. {
  277. format(msg, sizeof(msg), "%s muerto de un Choque", playerName);
  278. }
  279. default:
  280. {
  281. format(msg, sizeof(msg), "%s ha muerto solo", playerName);
  282. }
  283. }
  284. }
  285. TextDrawSetString(MTS, msg);
  286. TextDrawShowForAll(MTS);
  287. SetTimer("QTXD", 5000, 0);
  288. return 1;
  289. }
  290.  
  291. forward QTXD(playerid);
  292. public QTXD(playerid)
  293. {
  294. TextDrawHideForAll(MTS);
  295. return 1;
  296. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement