Skocz do zawartości

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.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Wklejka 1329380252197 dodana przez , 16.02.2012 09:17
Typ:


Shop
1329380252197
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.
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fun>
 
#define PLUGIN "New Shop"
#define VERSION "1.0"
#define AUTHOR "deLL"
 
new ma_ciche[33];
new ma_grawitacje[33];
new ma_defa[33];
new ma_hp[33];
 
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
 
	register_clcmd("say /sklep", "show_shop")
 
	register_event("HLTV", "Wyzeruj", "a", "1=0", "2=0")
 
 
}
 
public Wyzeruj() {
	new iPlayers[32], iNum, id
	get_players(iPlayers, iNum)
	for(new i=0; i<iNum; i++)
	{
		id = iPlayers[i]
 
		ma_grawitacje[id] = 0;
		ma_defa[id] = 0;
		ma_hp[id] = 0;
 
	}
}
 
public client_PreThink(id)
{
	if(is_user_connected(id) && !is_user_bot(id) && !is_user_hltv(id) && is_user_alive(id)) {
		if(ma_ciche[id]) {
			entity_set_int(id, EV_INT_flTimeStepSound, 300)
		}
	}
}
 
public StopGravity(id)
{	
	set_user_gravity(id, 1.0)
 
	client_print(id, print_chat, "Skonczyla Ci sie grawitacja")
 
	ma_grawitacje[id] = 0;
}
 
public show_shop(id)
{
	if(!(get_user_flags(id) & ADMIN_LEVEL_G)) { // Flaga S
		client_print(id, print_chat, "Nie masz uprawnien aby widziec to menu")
		return PLUGIN_HANDLED;
	}
 
	new MyShop=menu_create("Sklep [wyk. deLL]","akcja_sklep");
 
	menu_additem(MyShop,"Ciche kroki na cala mape [$16 000]")
	menu_additem(MyShop,"Zmiejszona grawitacja na 20 sekund [$10 000]")
	menu_additem(MyShop,"Defuser na runde [$4 000]")
	menu_additem(MyShop,"+80HP na runde [$10 000]")
 
	menu_display(id, MyShop,0);
	return PLUGIN_HANDLED;
}
 
public akcja_sklep(id, menu, item)
{
	switch(item)
	{
		case 0: //Ciche kroki
		{
			if(ma_ciche[id]) {
				client_print(id, print_chat, "Masz juz ciche kroki...");
			}
			else {
				if(cs_get_user_money(id) < 16000) {
					client_print(id, print_chat, "Potrzebujesz na to 16 000")
				}
				else {
					client_print(id, print_chat, "Kupiles ciche kroki na cala mape za 16 000")
					cs_set_user_money(id, cs_get_user_money(id)-16000, 1)
					ma_ciche[id] = 1;
				}
			}
		}
		case 1: //Zmniejszona grawitacja
		{
			if(ma_grawitacje[id]) {
				client_print(id, print_chat, "Masz juz grawitacje...");
			}
			else {
				if(cs_get_user_money(id) < 16000) {
					client_print(id, print_chat, "Potrzebujesz na to 10 000")
				}
				else {
					new args[1]
					args[0] = id
					client_print(id, print_chat, "Kupiles grawitacje na 20 sekund za 10 000")
					cs_set_user_money(id, cs_get_user_money(id)-10000, 1)
					set_user_gravity(id, 0.50)
					set_task(20.0, "StopGravity", id)
					ma_grawitacje[id] = 1;
				}
			}
		}
		case 2: // Defuser
		{
			if(ma_defa[id]) {
				client_print(id, print_chat, "Masz juz defuser...");
			}
			else {
				if(cs_get_user_money(id) < 4000) {
					client_print(id, print_chat, "Potrzebujesz na to 4 000")
				}
				else {
					if(cs_get_user_defuse(id)) {
						client_print(id, print_chat, "Masz juz defuser...")
						} else {
						client_print(id, print_chat, "Kupiles defuser na runde za 4 000")
						cs_set_user_money(id, cs_get_user_money(id)-4000, 1)
						cs_set_user_defuse(id, 1, 0, 160, 0, "defuser", 0)
						ma_defa[id] = 1;
					}
				}
			}
		}
		case 3: // +80P
		{
			if(ma_hp[id]) {
				client_print(id, print_chat, "Kupiles juz HP...");
			}
			else {
				if(cs_get_user_money(id) < 10000) {
					client_print(id, print_chat, "Potrzebujesz na to 10 000")
				}
				else {
					client_print(id, print_chat, "Kupiles 80 HP na runde za 10 000")
					cs_set_user_money(id, cs_get_user_money(id)-10000, 1)
					set_user_health(id, get_user_health(id)+80)
					ma_hp[id] = 1;
				}
			}
		}
	}
 
	menu_destroy(menu);
	return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/