Badyx

S.Drogas

Nov 13th, 2011
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.22 KB | None | 0 0
  1. //============================================================================//
  2. // //
  3. // CREADO POR BADYX DESDE 0 //
  4. // //
  5. // FECHA DE INICIO DE SCRIPT 13 DE NOVIEMBRE DE 2011 //
  6. // //
  7. // PROHIBIDO ROBAR CREDITOS //
  8. // //
  9. //============================================================================//
  10.  
  11. /* ======- NOTAS -====== */
  12. /* */
  13. /* GENERALMENTE SUELO USAR FUNCIONES CAMBIANDO EL NOMBRE PARA ASI
  14. FACILITARME EL TRABAJO. AQUI DEJO LAS FUNCIONES ORIGINALES
  15. */
  16.  
  17. /*
  18.  
  19. ProxDetector == MensajeUserCercano
  20. NombreEx == ObtenerNombre
  21.  
  22. */
  23.  
  24. #include <a_samp>
  25. #define COLOR_PURPLE 0xB60597FF
  26. #define AMARILLO 0xF5DEB3AA
  27. new EstaDrogado[MAX_PLAYERS];
  28.  
  29. new TieneMarihuana[MAX_PLAYERS];
  30. new TieneChocolate[MAX_PLAYERS];
  31. new TieneSpeed[MAX_PLAYERS];
  32. new TieneHeroina[MAX_PLAYERS];
  33.  
  34. new BigEar[MAX_PLAYERS];
  35.  
  36. #if defined FILTERSCRIPT
  37.  
  38. #else
  39.  
  40. main()
  41. {
  42. print("\n----------------------------------");
  43. print(" Sistema de drogas By The_Crazzy_Boy (Badyx) DESACTIVADO");
  44. print("----------------------------------\n");
  45. }
  46.  
  47. #endif
  48.  
  49. public OnPlayerCommandText(playerid, cmdtext[])
  50. {
  51. new string[256];
  52. if (strcmp("/tipodedroga", cmdtext, true, 10) == 0)
  53. {
  54. SendClientMessage(playerid, AMARILLO, "Mariguana -- /UsarMarihuana");
  55. SendClientMessage(playerid, AMARILLO, "Chocolate -- /UsarChocolate");
  56. SendClientMessage(playerid, AMARILLO, "Speed -- /UsarSpeed");
  57. SendClientMessage(playerid, AMARILLO, "Heroina -- /UsarHeroina");
  58. return 1;
  59. }
  60.  
  61. if (strcmp("/UsarMariguana", cmdtext, true, 10) == 0)
  62. {
  63. if(EstaDrogado[playerid] == 1)
  64. {
  65. SendClientMessage(playerid, AMARILLO, "Aun estas drogado");
  66. return 1;
  67. }
  68. if(TieneMarihuana[playerid] == 0)
  69. {
  70. SendClientMessage(playerid, AMARILLO, "No tienes Marihuana");
  71. return 1;
  72. }
  73. SetTimerEx("Drogado", 30000, false, "i", playerid);
  74. EstaDrogado[playerid] = 1;
  75. format(string, sizeof(string), "* %s Saca un porro de marihuana y se lo fuma.", ObtenerNombre(playerid));
  76. MensajeUserCercano(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  77. return 1;
  78. }
  79.  
  80. if (strcmp("/UsarChocolate", cmdtext, true, 10) == 0)
  81. {
  82. if(EstaDrogado[playerid] == 1)
  83. {
  84. SendClientMessage(playerid, AMARILLO, "Aun estas drogado");
  85. return 1;
  86. }
  87. if(TieneChocolate[playerid] == 0)
  88. {
  89. SendClientMessage(playerid, AMARILLO, "No tienes Chocolate");
  90. return 1;
  91. }
  92. SetTimerEx("Drogado", 30000, false, "i", playerid);
  93. EstaDrogado[playerid] = 1;
  94. format(string, sizeof(string), "* %s Saca un porro de Chocolate y se lo fuma.", ObtenerNombre(playerid));
  95. MensajeUserCercano(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  96. return 1;
  97. }
  98.  
  99. if (strcmp("/UsarSpeed", cmdtext, true, 10) == 0)
  100. {
  101. if(EstaDrogado[playerid] == 1)
  102. {
  103. SendClientMessage(playerid, AMARILLO, "Aun estas drogado");
  104. return 1;
  105. }
  106. if(TieneSpeed[playerid] == 0)
  107. {
  108. SendClientMessage(playerid, AMARILLO, "No tienes Speed");
  109. return 1;
  110. }
  111. SetTimerEx("Drogado", 30000, false, "i", playerid);
  112. EstaDrogado[playerid] = 1;
  113. format(string, sizeof(string), "* %s Saca un polvo blanco y lo inhala.", ObtenerNombre(playerid));
  114. MensajeUserCercano(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  115. return 1;
  116. }
  117.  
  118. if (strcmp("/UsarHeroina", cmdtext, true, 10) == 0)
  119. {
  120. if(EstaDrogado[playerid] == 1)
  121. {
  122. SendClientMessage(playerid, AMARILLO, "Aun estas drogado");
  123. return 1;
  124. }
  125. if(TieneHeroina[playerid] == 0)
  126. {
  127. SendClientMessage(playerid, AMARILLO, "No tienes Heroina");
  128. return 1;
  129. }
  130. SetTimerEx("Drogado", 30000, false, "i", playerid);
  131. EstaDrogado[playerid] = 1;
  132. format(string, sizeof(string), "* %s Saca una jeringuilla con un liquido y se lo inyecta en el brazo.", ObtenerNombre(playerid));
  133. MensajeUserCercano(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  134. return 1;
  135. }
  136. return 0;
  137. }
  138.  
  139.  
  140. forward Drogado(playerid);
  141. public Drogado(playerid)
  142. {
  143. new string[256];
  144. format(string, sizeof(string), "Se te paso el efecto de la droga.");
  145. GameTextForPlayer(playerid, string, 5000, 1);
  146. EstaDrogado[playerid] = 0;
  147. return 1;
  148. }
  149.  
  150.  
  151. forward MensajeUserCercano(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  152. public MensajeUserCercano(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  153. {
  154. if(IsPlayerConnected(playerid))
  155. {
  156. new Float:posx, Float:posy, Float:posz;
  157. new Float:oldposx, Float:oldposy, Float:oldposz;
  158. new Float:tempposx, Float:tempposy, Float:tempposz;
  159. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  160. //radi = 2.0; //Trigger Radius
  161. for(new i = 0; i < MAX_PLAYERS; i++)
  162. {
  163. if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
  164. {
  165. if(!BigEar[i])
  166. {
  167. GetPlayerPos(i, posx, posy, posz);
  168. tempposx = (oldposx -posx);
  169. tempposy = (oldposy -posy);
  170. tempposz = (oldposz -posz);
  171. //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  172. if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  173. {
  174. SendClientMessage(i, col1, string);
  175. }
  176. else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  177. {
  178. SendClientMessage(i, col2, string);
  179. }
  180. else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  181. {
  182. SendClientMessage(i, col3, string);
  183. }
  184. else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  185. {
  186. SendClientMessage(i, col4, string);
  187. }
  188. else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  189. {
  190. SendClientMessage(i, col5, string);
  191. }
  192. }
  193. else
  194. {
  195. SendClientMessage(i, col1, string);
  196. }
  197. }
  198. }
  199. }
  200. return 1;
  201. }
  202.  
  203. stock ObtenerNombre(playerid)
  204. {
  205. new string[24];
  206. GetPlayerName(playerid,string,24);
  207. new str[24];
  208. strmid(str,string,0,strlen(string),24);
  209. for(new i = 0; i < MAX_PLAYER_NAME; i++)
  210. {
  211. if (str[i] == '_') str[i] = ' ';
  212. }
  213. return str;
  214. }
  215.  
  216. //============================================================================//
  217. // SI TE SIRVIO RESPETA EL TRABAJO DEL CREADOR //
  218. // //
  219. //=========================FINAL DEL FILESCRIPT===============================//
  220.  
Advertisement
Add Comment
Please, Sign In to add comment