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 x8mj7zhwjv dodana przez Misiaczek ;c, 26.02.2012 15:48
Typ:



xenos
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.
/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <cstrike>
#include <fun>
 
new const gNazwaPluginu[] = "VIP FFA";
new const gWersjaPluginu[] = "1.0.0";
new const gAutorPluginu[] = "MisieQ";
 
new gPcvarPrefixTekstVIP[24], gMaxPlayers, gPcvarMenuBroniRunda, Runda, bool:MaC4[33];
 
new const gPrefixListy[] = "V.I.P";
new const gBrakGraczy[] = "Brak VIP'ow w grze!";
 
#define VIP ADMIN_LEVEL_A
 
public plugin_init() {
 
	register_plugin(gNazwaPluginu, gWersjaPluginu, gAutorPluginu);
 
	register_cvar("vip_prefix_tekst", "VIP");
	get_cvar_string("vip_prefix_tekst", gPcvarPrefixTekstVIP , sizeof gPcvarPrefixTekstVIP  -1)
	gPcvarMenuBroniRunda = register_cvar("vip_menu_broni_runda", "3");
 
	register_message(get_user_msgid("SayText"), "PrefixCzat");
	register_message(get_user_msgid("ScoreAttrib"), "msgScoreAttrib");
	register_logevent("Nowa_Runda", 2, "1=Round_Start");
	register_logevent("Restart_Rund", 2, "1=Game_Commencing");
	register_event("TextMsg", "Restart_Rund", "a", "2&Game_will_restart_in");
 
	gMaxPlayers = get_maxplayers();
 
	register_clcmd("say /vips","Lista");
	register_clcmd("say_team /vips","Lista");
}
 
public msgScoreAttrib( const MsgId, const MsgType, const MsgDest ) {
 
    static id;
    id = get_msg_arg_int( 1 );
 
    if( ( get_user_flags( id ) & VIP ) && !get_msg_arg_int( 2 )) {
        set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) );
    }
}
 
public PrefixCzat(msgId,msgDest,msgEnt) {
 
	new id = get_msg_arg_int(1);
 
	if(!is_user_connected(id))
		return PLUGIN_CONTINUE;
 
	if( get_user_flags( id ) & VIP ) {
		new szTmp[256],szTmp2[256];
 
		get_msg_arg_string(2,szTmp, charsmax( szTmp ) )
 
		new szPrefix[64];
		formatex(szPrefix,charsmax( szPrefix ),"^x04[%s]",gPcvarPrefixTekstVIP);
 
		if(!equal(szTmp,"#Cstrike_Chat_All")) {
			add(szTmp2,charsmax(szTmp2),szPrefix);
			add(szTmp2,charsmax(szTmp2)," ");
			add(szTmp2,charsmax(szTmp2),szTmp);
		}
		else {
			add(szTmp2,charsmax(szTmp2),szPrefix);
			add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 : %s2");
		}
 
		set_msg_arg_string(2,szTmp2);
	}	
	return PLUGIN_CONTINUE;
}
 
public Lista(id) {
 
	new nazwy[33][32];
	new count, x;
 
	for(new i = 1 ; i <= gMaxPlayers ; i++) {
		if(is_user_connected(i)) {
			if(get_user_flags(i) & VIP) {
				get_user_name(i, nazwy[count++], 31);	
			}
		}
	}
 
	if(count > 0) {
		for(x = 0 ; x < count ; x++) {
			ColorChat(id, GREEN, "%s: %s%s", gPrefixListy, nazwy[x], x < (count-1) ? ", ":"");
		}
	}
	else {
		ColorChat(id, GREEN, "%s: %s", gPrefixListy, gBrakGraczy);
	}
 
	return PLUGIN_CONTINUE
}
 
public Restart_Rund()
{
	Runda = 0;
 
	return PLUGIN_CONTINUE
}
 
public Nowa_Runda()
{
	Runda++;
	for(new i = 1 ; i <= gMaxPlayers ; i++)
	{
		if(get_user_flags(i) & VIP) 
		{
			if(Runda > get_pcvar_num(gPcvarMenuBroniRunda))
			{
				menu_broni(i);
			}
		}
	}
	return PLUGIN_HANDLED;
}
 
public menu_broni(id)
{
	new menu = menu_create("rV.i.P - Menu Broni:", "menu_broni_wybor");
 
	menu_additem(menu, "wM4A1r+wDeagler+wGranaty", "0", 0);
	menu_additem(menu, "wAK47r+wDeagler+wGranaty", "1", 0);
 
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
 
	return PLUGIN_CONTINUE;
}
 
public menu_broni_wybor(id, menu, item)
{
	if (item == MENU_EXIT)
	{
		menu_destroy(menu);
 
		return PLUGIN_HANDLED;
	}
	new data[6], iName[64];
	new acces, callback;
	menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback);
 
	new key = str_to_num(data);
	new CsTeams:userTeam = cs_get_user_team(id);
 
	switch(key)
	{
		case 0:
		{
			if (user_has_weapon(id, CSW_C4) && userTeam == CS_TEAM_T)
			{
				MaC4[id] = true;
			}
			else
			{
				MaC4[id] = false;
			}
 
			strip_user_weapons(id);
			give_item(id,"weapon_m4a1");
			cs_set_user_bpammo(id, CSW_M4A1, 120);
			give_item(id,"weapon_deagle");
			cs_set_user_bpammo(id, CSW_DEAGLE, 42);
			give_item(id,"weapon_knife");
			give_item(id, "weapon_hegrenade");
			give_item(id, "weapon_flashbang");
			give_item(id, "weapon_flashbang");
			give_item(id, "weapon_smokegrenade");
			give_item(id, "item_assaultsuit");
			give_item(id, "item_thighpack");
 
			if (MaC4[id])
			{
				give_item(id, "weapon_c4");
				cs_set_user_plant(id, 1, 1);
			}
			menu_destroy(menu);
			return PLUGIN_HANDLED;	
		}		
		case 1:
		{
			if (user_has_weapon(id, CSW_C4) && userTeam == CS_TEAM_T)
			{
				MaC4[id] = true;
			}
			else
			{
				MaC4[id] = false;
			}
 
			strip_user_weapons(id);
			give_item(id,"weapon_ak47");
			cs_set_user_bpammo(id, CSW_AK47, 120);
			give_item(id,"weapon_deagle");
			cs_set_user_bpammo(id, CSW_DEAGLE, 42);
			give_item(id,"weapon_knife");
			give_item(id, "weapon_hegrenade");
			give_item(id, "weapon_flashbang");
			give_item(id, "weapon_flashbang");
			give_item(id, "weapon_smokegrenade");
			give_item(id, "item_assaultsuit");
			give_item(id, "item_thighpack");
 
			if (MaC4[id])
			{
				give_item(id, "weapon_c4");
				cs_set_user_plant(id, 1, 1);
			}
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
	}
	menu_destroy(menu);
	return PLUGIN_HANDLED;
}
 
 
 

Dodanych wklejek: 4031
Powered By (Pav32) Pastebin © 2011