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. | #include <amxmodx>
#include <codmod>
#include <engine>
#include <cstrike>
#include <fun>
#define MUZYKA "sound/misc/asd.wav"
public plugin_init()
{
register_plugin("CodShop by MieTeK", "1.0", "MieTeK");
register_clcmd("say /sklep", "Sklep");
register_clcmd("say /shop", "Sklep");
}
public plugin_precache()
{
precache_generic("MUZYKA");
}
public Sklep(id)
{
new tytul[25];
format(tytul, 24, "\rSklep by \yMieTeK");
new menu = menu_create(tytul, "Sklep_Handler");
menu_additem(menu, "Ibuprofen \r[Leczy 10 HP] \yKoszt: \r1500$");//0
menu_additem(menu, "Fenacetyna \r[Leczy 25 HP] \yKoszt: \r3000$");//1
menu_additem(menu, "Tramal \r[Leczy 50 HP] \yKoszt: \r6000$");//2
menu_additem(menu, "Amfetamina \r[Wyzej skaczesz] \yKoszt: \r4000$");//3
menu_additem(menu, "Lotto \r[Losowanie bonusow] \yKoszt: \r10000$");//4
menu_additem(menu, "Doswiadczenie \r[Dostajesz losowy EXP] \yKoszt: \r10000$");//5
menu_additem(menu, "Ruletka \r[Dostajesz losowy perk] \yKoszt: \r6000$");//6
menu_display(id, menu);
client_cmd(id, "spk MUZYKA");
}
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+10);
if(nowe_zdrowie < maxzdrowie)
{
cs_set_user_money(id, kasa-1500);
set_user_health(id, nowe_zdrowie);
client_print(id, print_chat, "[COD:MW] Uleczono Cie o 10 hp!");
}
if(nowe_zdrowie > maxzdrowie && zdrowie != maxzdrowie)
{
cs_set_user_money(id, kasa-1500);
set_user_health(id, maxzdrowie);
client_print(id, print_chat, "[COD:MW] Jestes w pelni uleczony!");
}
}
else
client_print(id, print_chat, "[COD:MW] Masz za malo kasy!");
}
case 1:
{
if(kasa >= 3000)
{
new nowe_zdrowie = (zdrowie+25);
if(nowe_zdrowie < maxzdrowie)
{
cs_set_user_money(id, kasa-3000);
set_user_health(id, nowe_zdrowie);
client_print(id, print_chat, "[COD:MW] Uleczono Cie o 25 hp!");
}
if(nowe_zdrowie >= maxzdrowie && zdrowie != maxzdrowie)
{
cs_set_user_money(id, kasa-3000);
set_user_health(id, maxzdrowie);
client_print(id, print_chat, "[COD:MW] Jestes w pelni uleczony!");
}
}
else
client_print(id, print_chat, "[COD:MW] Masz za malo kasy!");
}
case 2:
{
if(kasa >= 6000)
{
new nowe_zdrowie = (zdrowie+50);
if(nowe_zdrowie < maxzdrowie)
{
cs_set_user_money(id, kasa-6000);
set_user_health(id, nowe_zdrowie);
client_print(id, print_chat, "[COD:MW] Uleczono Cie o 50 hp!");
}
if(nowe_zdrowie >= maxzdrowie && zdrowie != maxzdrowie)
{
cs_set_user_money(id, kasa-6000);
set_user_health(id, maxzdrowie);
client_print(id, print_chat, "[COD:MW] Jestes w pelni uleczony!");
}
}
else
client_print(id, print_chat, "[COD:MW] Masz za malo kasy!");
}
case 3:
{
if(kasa >= 4000)
{
cs_set_user_money(id, kasa-4000);
set_user_gravity(id, 0.5);
client_print(id, print_chat, "[COD:MW] Skaczesz wyzej!");
}
if(kasa < 4000)
client_print(id, print_chat, "[COD:MW] Masz za malo kasy!");
}
case 4:
{
if(kasa >= 10000)
{
cs_set_user_money(id, kasa-10000);
client_print(id, print_chat, "[COD:MW] Trwa losowanie!");
new totek = random_num(0, 10);
switch(totek)
{
case 0:
{
new moneybonus = random_num(500,5000);
client_print(id, print_chat, "[COD:MW] Wygrales kase %i$!", moneybonus);
cs_set_user_money(id, moneybonus);
}
case 1:
{
new moneybonus = random_num(5000,16000);
client_print(id, print_chat, "[COD:MW] 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, "[COD:MW] Wygrales nizsza grawitacje!");
}
case 3:
client_print(id, print_chat, "[COD:MW] 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, "[COD:MW] Wygrales %i dodatkowego EXP'a !", bonusxp);
}
case 5:
{
cod_set_user_perk(id, -1, -1, 1);
client_print(id, print_chat, "[COD:MW] Wygrales losowy perk!");
}
case 6:
{
new healthbonus = random_num(10,55);
set_user_health(id, get_user_health(id)+healthbonus);
client_print(id, print_chat, "[COD:MW] Wygrales %i dodatkowego HP!", healthbonus);
}
case 7:
{
new healthbonus = random_num(10,30);
set_user_health(id, get_user_health(id)-healthbonus);
client_print(id, print_chat, "[COD:MW] Straciles %i HP!", healthbonus);
}
case 8:
client_print(id, print_chat, "[COD:MW] Niestety nic nie wygrales !");
case 9:
{
new xpbonus = random_num(75,150);
cod_set_user_xp(id, cod_get_user_xp(id)+xpbonus);
client_print(id, print_chat, "[COD:MW] Wygrales %i dodatkowego EXP'a!", xpbonus);
}
case 10:
{
cs_set_user_money(id, 10000);
client_print(id, print_chat, "[COD:MW] Nic nie wygrales, ale kasa sie zwrocila!");
}
}
}
if(kasa < 10000)
client_print(id, print_chat, "[COD:MW] Masz za malo kasy!");
}
case 5:
{
if(kasa >= 10000)
{
new exp = cod_get_user_xp(id);
new losowy = random_num(25, 250);
cs_set_user_money(id, kasa-10000);
cod_set_user_xp(id, exp+losowy)
client_print(id, print_chat, "[COD:MW] Dostales %i EXP'a!", losowy);
}
if(kasa < 10000)
client_print(id, print_chat, "[COD:MW] Masz za malo kasy!");
}
case 6:
{
if(kasa >= 6000)
{
cs_set_user_money(id, kasa-6000);
cod_set_user_perk(id, -1, -1, 1);
client_print(id, print_chat, "[COD:MW] Kupiles losowy perk!");
}
if(kasa < 6000)
client_print(id, print_chat, "[COD:MW] Masz za malo kasy!");
}
}
return PLUGIN_CONTINUE;
}
|