Guest User

C-Shop

a guest
Jul 14th, 2010
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.35 KB | None | 0 0
  1. //------------------------------------------------------------------------------
  2.  
  3. #include <a_samp>
  4.  
  5. #define ITEMMENU 567
  6. #define PICKUP 1239// 1239 pickup i | 1318 arrow
  7.  
  8. //------------------------------------------------------------------------------
  9.  
  10. #define COLOR_AMARILLO 0xdad83bff
  11. #define COLOR_ROJO 0xda3b3bff
  12. #define COLOR_VERDE 0xa5cf67ff
  13. #define COLOR_CELESTE 0x9be3f1ff
  14. #define COLOR_AZUL 0x5a69b4ff
  15. #define COLOR_CAFE 0xF5DEB3AA
  16.  
  17. #define COLOR_FADE1 0xE6E6E6E6
  18. #define COLOR_FADE2 0xC8C8C8C8
  19. #define COLOR_FADE3 0xAAAAAAAA
  20. #define COLOR_FADE4 0x8C8C8C8C
  21. #define COLOR_FADE5 0x6E6E6E6E
  22.  
  23. #define COLOR_GRAD1 0xB4B5B7FF
  24. #define COLOR_GRAD2 0xBFC0C2FF
  25. #define COLOR_GRAD3 0xCBCCCEFF
  26. #define COLOR_GRAD4 0xD8D8D8FF
  27. #define COLOR_GRAD5 0xE3E3E3FF
  28. #define COLOR_GRAD6 0xF0F0F0FF
  29.  
  30. #define COLOR_DUDA 0x8f58a2ff
  31. #define COLOR_INFO 0xeee756ff
  32. #define COLOR_VEHICULO 0x5cfa52ff
  33. #define COLOR_NADA 0xfffefe22
  34. #define COLOR_ADMIN 0x00ff6cff
  35. #define COLOR_KICK 0xDABB3EAA
  36.  
  37. #define COLOR_ROJO2 0xFF6347AA
  38. #define COLOR_AZUL2 0x33CCFFAA
  39. #define COLOR_VERDE2 0x9ACD32AA
  40. #define COLOR_VERDE3 0x4b7d4eff
  41. #define COLOR_CELESTE2 0x7ad4bcff
  42.  
  43. //------------------------------------------------------------------------------
  44.  
  45. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  46.  
  47. //------------------------------------------------------------------------------
  48.  
  49. main()
  50. {
  51. print("\n-------------------------------------");
  52. print(" CShop [Armas-Items-Accesorios] ");
  53. print(" by CaCoby ");
  54. print("-------------------------------------\n");
  55. }
  56.  
  57. //------------------------------------------------------------------------------
  58.  
  59. public OnFilterScriptInit()
  60. {
  61. //AmmuNation
  62.  
  63. AddStaticPickup(PICKUP,1,295.3706,-80.7968,1001.5156,0);
  64. AddStaticPickup(PICKUP,1,295.2078,-38.5138,1001.5156,0);
  65. AddStaticPickup(PICKUP,1,290.0471,-109.7813,1001.5156,0);
  66. AddStaticPickup(PICKUP,1,312.3357,-166.1313,999.6010,0);
  67. AddStaticPickup(PICKUP,1,314.2549,-134.1494,999.6016,0);
  68.  
  69. //24/7
  70.  
  71. AddStaticPickup(PICKUP,1,-23.2666,-55.6207,1003.5469,0);
  72. AddStaticPickup(PICKUP,1,-28.0966,-89.9442,1003.5469,0);
  73. AddStaticPickup(PICKUP,1,-10.7299,-178.2628,1003.5469,0);
  74. AddStaticPickup(PICKUP,1,-29.2871,-185.1264,1003.5469,0);
  75. AddStaticPickup(PICKUP,1,2.1807,-29.0137,1003.5494,0);
  76. AddStaticPickup(PICKUP,1,-22.2870,-138.6216,1003.5469,0);
  77. AddStaticPickup(PICKUP,1,-30.9230,-29.0183,1003.5573,0);
  78.  
  79. //Sex Shop
  80.  
  81. AddStaticPickup(PICKUP,1,-105.9954,-10.6289,1000.7188,0);
  82. AddStaticPickup(PICKUP,1,-103.8498,-22.6787,1000.7188,0);
  83. }
  84.  
  85. //------------------------------------------------------------------------------
  86.  
  87. public OnPlayerCommandText(playerid, cmdtext[])
  88. {
  89.  
  90. if (strcmp("/armas", cmdtext, true, 10) == 0)
  91. {
  92. if(PlayerToPoint(1.0,playerid,295.3706,-80.7968,1001.5156) || PlayerToPoint(1.0,playerid,295.2078,-38.5138,1001.5156) || PlayerToPoint(1.0,playerid,290.0471,-109.7813,1001.5156) || PlayerToPoint(1.0,playerid,312.3357,-166.1313,999.6010) || PlayerToPoint(1.0,playerid,314.2549,-134.1494,999.6016))
  93. {
  94. ShowPlayerDialog(playerid,ITEMMENU,DIALOG_STYLE_INPUT,"Ammu-Nation","id Arma Precio\n\n1 Deagle $2000\n2 Escopeta $6000\n3 Combate $8000\n4 Mp5 $6000\n5 Ak47 $8000\n6 M4 $10000","Comprar","Cancelar");
  95. return 1;
  96. }
  97. return SendClientMessage(playerid,COLOR_AZUL,"[ ! ] No estas en un Ammu-Nation");
  98. }
  99.  
  100. if (strcmp("/comprar", cmdtext, true, 10) == 0)
  101. {
  102. if(PlayerToPoint(1.0,playerid,-23.2666,-55.6207,1003.5469) || PlayerToPoint(1.0,playerid,-28.0966,-89.9442,1003.5469) || PlayerToPoint(1.0,playerid,-10.7299,-178.2628,1003.5469) || PlayerToPoint(1.0,playerid,-29.2871,-185.1264,1003.5469) || PlayerToPoint(1.0,playerid,2.1807,-29.0137,1003.5494) || PlayerToPoint(1.0,playerid,-22.2870,-138.6216,1003.5469)|| PlayerToPoint(1.0,playerid,-30.9230,-29.0183,1003.5573))
  103. {
  104. ShowPlayerDialog(playerid, ITEMMENU+1, DIALOG_STYLE_INPUT,"Tienda 24/7","id Item Precio\n\n1 Camara $8000\n2 Cuchillo $2000\n3 Palo de Pool $1000\n4 Flores $500 ","Comprar", "Cancelar");
  105. return 1;
  106. }
  107. return SendClientMessage(playerid,COLOR_VERDE,"[ ! ] No estas en un 24/7");
  108. }
  109.  
  110. if (strcmp("/items", cmdtext, true, 10) == 0)
  111. {
  112. if(PlayerToPoint(1.0,playerid,-105.9954,-10.6289,1000.7188) || PlayerToPoint(1.0,playerid,-103.8498,-22.6787,1000.7188))
  113. {
  114. ShowPlayerDialog(playerid, ITEMMENU+2, DIALOG_STYLE_INPUT,"SexShop","id Item Precio\n\n1 Dildo $1000\n2 Vibrador Pequeño $1500\n3 Vibrador Grande $2000\n4 Consolador $2000\n","Comprar", "Cancelar");
  115. return 1;
  116. }
  117. return SendClientMessage(playerid,COLOR_ROJO,"[ ! ] No estas en una SexShop");
  118. }
  119.  
  120. return 0;
  121. }
  122.  
  123. //------------------------------------------------------------------------------
  124.  
  125. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  126. {
  127. if(dialogid == ITEMMENU)
  128. {
  129. if(response == 1)
  130. {
  131. if(strval(inputtext) == 1)
  132. {
  133. if(GetPlayerMoney(playerid) <= 2000)
  134. {
  135. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  136. }else{
  137. GivePlayerWeapon(playerid,24,100);
  138. GivePlayerMoney(playerid, -2000);
  139. }
  140. ShowPlayerDialog(playerid,ITEMMENU,DIALOG_STYLE_INPUT,"Ammu-Nation","id Arma Precio\n\n1 Deagle $2000\n2 Escopeta $6000\n3 Combate $8000\n4 Mp5 $6000\n5 Ak47 $8000\n6 M4 $10000","Comprar","Cancelar");
  141. }
  142. if(strval(inputtext) == 2)
  143. {
  144. if(GetPlayerMoney(playerid) <= 6000)
  145. {
  146. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  147. }else{
  148. GivePlayerWeapon(playerid,25,50);
  149. GivePlayerMoney(playerid, -6000);
  150. }
  151. ShowPlayerDialog(playerid,ITEMMENU,DIALOG_STYLE_INPUT,"Ammu-Nation","id Arma Precio\n\n1 Deagle $2000\n2 Escopeta $6000\n3 Combate $8000\n4 Mp5 $6000\n5 Ak47 $8000\n6 M4 $10000","Comprar","Cancelar");
  152. }
  153. if(strval(inputtext) == 3)
  154. {
  155. if(GetPlayerMoney(playerid) <= 8000)
  156. {
  157. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  158. }else{
  159. GivePlayerWeapon(playerid,27,50);
  160. GivePlayerMoney(playerid, -8000);
  161. }
  162. ShowPlayerDialog(playerid,ITEMMENU,DIALOG_STYLE_INPUT,"Ammu-Nation","id Arma Precio\n\n1 Deagle $2000\n2 Escopeta $6000\n3 Combate $8000\n4 Mp5 $6000\n5 Ak47 $8000\n6 M4 $10000","Comprar","Cancelar");
  163. }
  164. if(strval(inputtext) == 4)
  165. {
  166. if(GetPlayerMoney(playerid) <= 6000)
  167. {
  168. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  169. }else{
  170. GivePlayerWeapon(playerid,29,50);
  171. GivePlayerMoney(playerid, -6000);
  172. }
  173. ShowPlayerDialog(playerid,ITEMMENU,DIALOG_STYLE_INPUT,"Ammu-Nation","id Arma Precio\n\n1 Deagle $2000\n2 Escopeta $6000\n3 Combate $8000\n4 Mp5 $6000\n5 Ak47 $8000\n6 M4 $10000","Comprar","Cancelar");
  174. }
  175. if(strval(inputtext) == 5)
  176. {
  177. if(GetPlayerMoney(playerid) <= 8000)
  178. {
  179. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  180. }else{
  181. GivePlayerWeapon(playerid,30,100);
  182. GivePlayerMoney(playerid, -8000);
  183. }
  184. ShowPlayerDialog(playerid,ITEMMENU,DIALOG_STYLE_INPUT,"Ammu-Nation","id Arma Precio\n\n1 Deagle $2000\n2 Escopeta $6000\n3 Combate $8000\n4 Mp5 $6000\n5 Ak47 $8000\n6 M4 $10000","Comprar","Cancelar");
  185. }
  186. if(strval(inputtext) == 6)
  187. {
  188. if(GetPlayerMoney(playerid) <= 10000)
  189. {
  190. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  191. }else{
  192. GivePlayerWeapon(playerid,31,100);
  193. GivePlayerMoney(playerid, -10000);
  194. }
  195. ShowPlayerDialog(playerid,ITEMMENU,DIALOG_STYLE_INPUT,"Ammu-Nation","id Arma Precio\n\n1 Deagle $2000\n2 Escopeta $6000\n3 Combate $8000\n4 Mp5 $6000\n5 Ak47 $8000\n6 M4 $10000","Comprar","Cancelar");
  196. }
  197. }
  198. }
  199.  
  200. //------------------------------------------------------------------------------
  201.  
  202. if(dialogid == ITEMMENU+1)
  203. {
  204. if(response == 1)
  205. {
  206. if(strval(inputtext) == 1)
  207. {
  208. if(GetPlayerMoney(playerid) <= 8000)
  209. {
  210. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  211. }else{
  212. GivePlayerWeapon(playerid,43,50);
  213. GivePlayerMoney(playerid, -8000);
  214. }
  215. ShowPlayerDialog(playerid, ITEMMENU+1, DIALOG_STYLE_INPUT,"Tienda 24/7","id Item Precio\n\n1 Camara $8000\n2 Cuchillo $2000\n3 Palo de Pool $1000\n4 Flores $500 ","Comprar", "Cancelar");
  216. }
  217. if(strval(inputtext) == 2)
  218. {
  219. if(GetPlayerMoney(playerid) <= 2000)
  220. {
  221. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  222. }else{
  223. GivePlayerWeapon(playerid,4,0);
  224. GivePlayerMoney(playerid, -2000);
  225. }
  226. ShowPlayerDialog(playerid, ITEMMENU+1, DIALOG_STYLE_INPUT,"Tienda 24/7","id Item Precio\n\n1 Camara $8000\n2 Cuchillo $2000\n3 Palo de Pool $1000\n4 Flores $500 ","Comprar", "Cancelar");
  227. }
  228. if(strval(inputtext) == 3)
  229. {
  230. if(GetPlayerMoney(playerid) <= 1000)
  231. {
  232. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  233. }else{
  234. GivePlayerWeapon(playerid,7,0);
  235. GivePlayerMoney(playerid, -1000);
  236. }
  237. ShowPlayerDialog(playerid, ITEMMENU+1, DIALOG_STYLE_INPUT,"Tienda 24/7","id Item Precio\n\n1 Camara $8000\n2 Cuchillo $2000\n3 Palo de Pool $1000\n4 Flores $500 ","Comprar", "Cancelar");
  238. }
  239. if(strval(inputtext) == 4)
  240. {
  241. if(GetPlayerMoney(playerid) <= 500)
  242. {
  243. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  244. }else{
  245. GivePlayerWeapon(playerid,14,0);
  246. GivePlayerMoney(playerid, -500);
  247. }
  248. ShowPlayerDialog(playerid, ITEMMENU+1, DIALOG_STYLE_INPUT,"Tienda 24/7","id Item Precio\n\n1 Camara $8000\n2 Cuchillo $2000\n3 Palo de Pool $1000\n4 Flores $500 ","Comprar", "Cancelar");
  249. }
  250. }
  251.  
  252. if(dialogid == ITEMMENU+2)
  253. {
  254. if(response == 1)
  255. {
  256. if(strval(inputtext) == 1)
  257. {
  258. if(GetPlayerMoney(playerid) <= 1000)
  259. {
  260. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  261. }else{
  262. GivePlayerWeapon(playerid,10,0);
  263. GivePlayerMoney(playerid, -1000);
  264. }
  265. ShowPlayerDialog(playerid, ITEMMENU+2, DIALOG_STYLE_INPUT,"SexShop","id Item Precio\n\n1 Dildo $1000\n2 Vibrador Pequeño $1500\n3 Vibrador Grande $2000\n4 Consolador $2000\n","Comprar", "Cancelar");
  266. }
  267. if(strval(inputtext) == 2)
  268. {
  269. if(GetPlayerMoney(playerid) <= 1500)
  270. {
  271. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  272. }else{
  273. GivePlayerWeapon(playerid,11,0);
  274. GivePlayerMoney(playerid, -1500);
  275. }
  276. ShowPlayerDialog(playerid, ITEMMENU+2, DIALOG_STYLE_INPUT,"SexShop","id Item Precio\n\n1 Dildo $1000\n2 Vibrador Pequeño $1500\n3 Vibrador Grande $2000\n4 Consolador $2000\n","Comprar", "Cancelar");
  277. }
  278. if(strval(inputtext) == 3)
  279. {
  280. if(GetPlayerMoney(playerid) <= 2000)
  281. {
  282. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  283. }else{
  284. GivePlayerWeapon(playerid,12,0);
  285. GivePlayerMoney(playerid, -2000);
  286. }
  287. ShowPlayerDialog(playerid, ITEMMENU+2, DIALOG_STYLE_INPUT,"SexShop","id Item Precio\n\n1 Dildo $1000\n2 Vibrador Pequeño $1500\n3 Vibrador Grande $2000\n4 Consolador $2000\n","Comprar", "Cancelar");
  288. }
  289. if(strval(inputtext) == 4)
  290. {
  291. if(GetPlayerMoney(playerid) <= 2000)
  292. {
  293. SendClientMessage(playerid,COLOR_ROJO2,"[ ! ] No tienes dinero suficiente");
  294. }else{
  295. GivePlayerWeapon(playerid,13,0);
  296. GivePlayerMoney(playerid, -2000);
  297. }
  298. ShowPlayerDialog(playerid, ITEMMENU+2, DIALOG_STYLE_INPUT,"SexShop","id Item Precio\n\n1 Dildo $1000\n2 Vibrador Pequeño $1500\n3 Vibrador Grande $2000\n4 Consolador $2000\n","Comprar", "Cancelar");
  299. }
  300. }
  301. }
  302. }
  303. return 1;
  304. }
  305.  
  306. //------------------------------------------------------------------------------
  307.  
  308. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  309. {
  310. if(IsPlayerConnected(playerid))
  311. {
  312. new Float:oldposx, Float:oldposy, Float:oldposz;
  313. new Float:tempposx, Float:tempposy, Float:tempposz;
  314. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  315. tempposx = (oldposx -x);
  316. tempposy = (oldposy -y);
  317. tempposz = (oldposz -z);
  318. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  319. {
  320. return 1;
  321. }
  322. }
  323. return 0;
  324. }
  325.  
  326. //------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment