Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Wklejka 4y6th36948w0 dodana przez Jerem96, 30.04.2012 10:34
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149. 150. 151. 152. 153. 154. 155. 156. 157. 158. 159. 160. 161. 162. 163. 164. 165. 166. 167. 168. 169. 170. 171. 172. 173. 174. 175. 176. 177. 178. 179. 180. 181. 182. 183. 184. 185. 186. 187. 188. 189. 190. 191. 192. 193. 194. 195. 196. 197. 198. 199. 200. 201. 202. 203. 204. 205. 206. 207. 208. 209. 210. 211. 212. 213. 214. 215. 216. 217. 218. 219. 220. 221. 222. 223. 224. 225. 226. 227. 228. 229. 230. 231. 232. 233. 234. 235. 236. 237. 238. 239. 240. 241. 242.
#include <amxmodx>
#include <codmod>
#include <engine>
#include <cstrike>
#include <fun>
public plugin_init()
{
register_plugin("CodShop by MieTeK", "1.0", "MieTeK");
register_clcmd("say /sklep", "Sklep");
register_clcmd("say /shop", "Sklep");
register_clcmd("say /s", "Sklep");
}
public Sklep(id)
{
new tytul[25];
format(tytul, 24, "rSklep");
new menu = menu_create(tytul, "Sklep_Handler");
menu_additem(menu, "Ibuprofen r[Leczy 10 HP] yKoszt: r1500$");//1
menu_additem(menu, "Fenacetyna r[Leczy 25 HP] yKoszt: r3000$");//2
menu_additem(menu, "Tramal r[Leczy 50 HP] yKoszt: r4500$");//3
menu_additem(menu, "Amfetamina r[Wyzej skaczesz] yKoszt: r4000$");//4
menu_additem(menu, "Lotto r[Losowanie bonusow] yKoszt: r2000$");//5
menu_additem(menu, "Doswiadczenie r[Dostajesz losowy EXP] yKoszt: r10000$");//6
menu_additem(menu, "Losuj perk#1 r[Dostajesz losowy perk] yKoszt: r3000$");//7
menu_additem(menu, "Losuj perk#2 r[Dostajesz losowy perk slotu 2] yKoszt: r3000$");//7
menu_display(id, menu);
}
public Sklep_Handler(id, menu, item)
{
if(!is_user_alive(id) || !is_user_connected(id))
return PLUGIN_CONTINUE;
new zdrowie = get_user_health(id);
new kasa = cs_get_user_money(id);
new maxzdrowie = cod_get_user_health(id)+100
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_CONTINUE;
}
switch(item)
{
case 0:
{
if(kasa >= 1500)
{
new nowe_zdrowie = (zdrowie+50);
if(nowe_zdrowie < maxzdrowie)
{
cs_set_user_money(id, kasa-1500);
set_user_health(id, nowe_zdrowie);
client_print(id, print_chat, " Uleczono Cie o 50 hp!");
}
if(nowe_zdrowie > maxzdrowie && zdrowie != maxzdrowie)
{
cs_set_user_money(id, kasa-1500);
set_user_health(id, maxzdrowie);
client_print(id, print_chat, " Jestes w pelni uleczony!");
}
}
else
client_print(id, print_chat, " Masz za malo kasy!");
}
case 1:
{
if(kasa >= 3000)
{
new nowe_zdrowie = (zdrowie+100);
if(nowe_zdrowie < maxzdrowie)
{
cs_set_user_money(id, kasa-3000);
set_user_health(id, nowe_zdrowie);
client_print(id, print_chat, " Uleczono Cie o 100 hp!");
}
if(nowe_zdrowie >= maxzdrowie && zdrowie != maxzdrowie)
{
cs_set_user_money(id, kasa-3000);
set_user_health(id, maxzdrowie);
client_print(id, print_chat, " Jestes w pelni uleczony!");
}
}
else
client_print(id, print_chat, " Masz za malo kasy!");
}
case 2:
{
if(kasa >= 6000)
{
new nowe_zdrowie = (zdrowie+200);
if(nowe_zdrowie < maxzdrowie)
{
cs_set_user_money(id, kasa-6000);
set_user_health(id, nowe_zdrowie);
client_print(id, print_chat, " Uleczono Cie o 200 hp!");
}
if(nowe_zdrowie >= maxzdrowie && zdrowie != maxzdrowie)
{
cs_set_user_money(id, kasa-6000);
set_user_health(id, maxzdrowie);
client_print(id, print_chat, " Jestes w pelni uleczony!");
}
}
else
client_print(id, print_chat, " Masz za malo kasy!");
}
case 3:
{
if(kasa >= 2000)
{
cs_set_user_money(id, kasa-2000);
set_user_gravity(id, 0.5);
client_print(id, print_chat, " Skaczesz wyzej!");
}
if(kasa < 2000)
client_print(id, print_chat, " Masz za malo kasy!");
}
case 4:
{
if(kasa >= 2000)
{
cs_set_user_money(id, kasa-2000);
client_print(id, print_chat, " Trwa losowanie!");
new totek = random_num(0, 10);
switch(totek)
{
case 0:
{
new moneybonus = random_num(500,5000);
client_print(id, print_chat, " Wygrales kase %i$!", moneybonus);
cs_set_user_money(id, moneybonus);
}
case 1:
{
new moneybonus = random_num(5000,16000);
client_print(id, print_chat, " Wygrales super kase %i$!", moneybonus);
cs_set_user_money(id, moneybonus);
}
case 2:
{
set_user_gravity(id, get_user_gravity(id)-0.3);
client_print(id, print_chat, " Wygrales nizsza grawitacje!");
}
case 3:
client_print(id, print_chat, " Niestety nic nie wygrales!");
case 4:
{
new bonusxp = random_num(15,75);
cod_set_user_xp(id, cod_get_user_xp(id)+bonusxp);
client_print(id, print_chat, " Wygrales %i dodatkowego EXP'a !", bonusxp);
}
case 5:
{
cod_set_user_perk(id, -1, -1, 1, 0);
client_print(id, print_chat, " Wygrales losowy perk!");
}
case 6:
{
cod_set_user_perk(id, -1, -1, 1, 1);
client_print(id, print_chat, " Wygrales losowy perk na slot 2!");
}
case 7:
{
new healthbonus = random_num(10,55);
set_user_health(id, get_user_health(id)+healthbonus);
client_print(id, print_chat, " Wygrales %i dodatkowego HP!", healthbonus);
}
case 8:
{
new healthbonus = random_num(10,30);
set_user_health(id, get_user_health(id)-healthbonus);
client_print(id, print_chat, " Straciles %i HP!", healthbonus);
}
case 9:
client_print(id, print_chat, " Niestety nic nie wygrales !");
}
case 10:
{
new xpbonus = random_num(75,150);
cod_set_user_xp(id, cod_get_user_xp(id)+xpbonus);
client_print(id, print_chat, " Wygrales %i dodatkowego EXP'a!", xpbonus);
}
case 11:
{
cs_set_user_money(id, 16000);
client_print(id, print_chat, " Nic nie wygrales, ale kasa sie zwrocila!");
}
}
}
if(kasa < 2000)
client_print(id, print_chat, " Masz za malo kasy!");
}
case 5:
{
if(kasa >= 3000)
{
new exp = cod_get_user_xp(id);
new losowy = random_num(2500, 25000);
cs_set_user_money(id, kasa-10000);
cod_set_user_xp(id, exp+losowy)
client_print(id, print_chat, " Dostales %i EXP'a!", losowy);
}
if(kasa < 2000)
client_print(id, print_chat, " Masz za malo kasy!");
}
case 6:
{
if(kasa >= 3000)
{
cs_set_user_money(id, kasa-3000);
cod_set_user_perk(id, -1, -1, 1, 0);
client_print(id, print_chat, " Kupiles losowy perk!");
}
if(kasa < 3000)
client_print(id, print_chat, " Masz za malo kasy!");
}
case 7:
{
if(kasa >= 3000)
{
cs_set_user_money(id, kasa-3000);
cod_set_user_perk(id, -1, -1, 1, 1);
client_print(id, print_chat, " Kupiles losowy perk!");
}
if(kasa < 3000)
client_print(id, print_chat, " Masz za malo kasy!");
}
}
return PLUGIN_CONTINUE;
}
Dodanych wklejek: 15354
Powered By (Pav32) Pastebin © 2011


Dodatki SourceMod


