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 6rpy6bzgl079 dodana przez dasiek, 05.12.2013 17:58
Typ:



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.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.
282.
283.
284.
285.
286.
287.
288.
289.
290.
291.
292.
293.
294.
295.
296.
297.
298.
299.
300.
301.
#include <amxmodx>
#include <colorchat>
#include <cstrike>
#include <csx>
#include <engine>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <stripweapons>
 
#define DMG_HE (1<<24)
#define FL_ONGROUND (1<<9)
#define FL_WATERJUMP (1<<11)
#define IsPlayer(%1) (1<=%1<=maxPlayers)
#define g_Buffer 1536
 
forward amxbans_admin_connect(id);
 
new Array:g_Array, CsArmorType:armortype, bool:g_FreezeTime, bool:g_Vip[33], bool:g_speed[33],
gRound=0, g_Hudmsg, ioid, maxPlayers, menu,
menu_callback_handler, skoki[33], weapon_id;
 
new const g_Langcmd[][]={"say /vips","say_team /vips","say /vipy","say_team /vipy"};
new const g_Prefix[] = "Vip Chat";
 
public plugin_init(){
	register_plugin("VIP Ultimate", "12.3.0.2", "benio101 & speedkill");
	RegisterHam(get_player_resetmaxspeed_func(), "player", "fw_Player_ResetMaxSpeed", 1);
	register_logevent("logevent_round_start", 2, "1=Round_Start");
	register_event("HLTV", "event_new_round", "a", "1=0", "2=0");
	RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1);
	register_logevent("RoundEnd", 2, "1=Round_End");
	register_forward(FM_CmdStart, "CmdStartPre");
	RegisterHam(Ham_TakeDamage, "player", "takeDamage", 0);
	register_logevent("GameCommencing", 2, "1=Game_Commencing");
	register_event("DeathMsg", "DeathMsg", "a");
	register_message(get_user_msgid("ScoreAttrib"), "VipStatus");
	g_Array=ArrayCreate(64,32);
	for(new i;i<sizeof g_Langcmd;i++){
		register_clcmd(g_Langcmd[i], "ShowVips");
	}
	register_clcmd("say /vip", "ShowMotd");
	set_task(30.0, "ShowAdv",.flags = "b");
	register_clcmd("say_team", "VipChat");
	register_message(get_user_msgid("SayText"),"handleSayText");
	g_Hudmsg=CreateHudSyncObj();
}
public client_authorized(id){
	if(get_user_flags(id) & 524288 == 524288){
		client_authorized_vip(id);
	}
}
public client_authorized_vip(id){
	g_Vip[id]=true;
	new g_Name[64];
	get_user_name(id,g_Name,charsmax(g_Name));
 
	new g_Size = ArraySize(g_Array);
	new szName[64];
 
	for(new i = 0; i < g_Size; i++){
		ArrayGetString(g_Array, i, szName, charsmax(szName));
 
		if(equal(g_Name, szName)){
			return 0;
		}
	}
	ArrayPushString(g_Array,g_Name);
	set_hudmessage(24, 190, 220, 0.25, 0.2, 0, 6.0, 6.0);
	ShowSyncHudMsg(0, g_Hudmsg, "Vip %s wbija na serwer !",g_Name);
 
	return PLUGIN_CONTINUE;
}
public client_disconnect(id){
	if(g_Vip[id]){
		client_disconnect_vip(id);
	}
}
public client_disconnect_vip(id){
	g_Vip[id]=false;
	g_speed[id]=false;
	new Name[64];
	get_user_name(id,Name,charsmax(Name));
 
	new g_Size = ArraySize(g_Array);
	new g_Name[64];
 
	for(new i = 0; i < g_Size; i++){
		ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
 
		if(equal(g_Name,Name)){
			ArrayDeleteItem(g_Array,i);
			break;
		}
	}
}
Ham:get_player_resetmaxspeed_func(){
	#if defined Ham_CS_Player_ResetMaxSpeed
	return IsHamValid(Ham_CS_Player_ResetMaxSpeed)?Ham_CS_Player_ResetMaxSpeed:Ham_Item_PreFrame;
	#else
	return Ham_Item_PreFrame;
	#endif
}
public fw_Player_ResetMaxSpeed(id){
	if(g_Vip[id]){
		if(is_user_alive(id)){
			fw_Player_ResetMaxSpeedVip(id);
		}
	}
}
public logevent_round_start(){
	g_FreezeTime=false;
}
public event_new_round(){
	g_FreezeTime=true;
	++gRound;
}
public SpawnedEventPre(id){
	if(g_Vip[id]){
		if(is_user_alive(id)){
			SpawnedEventPreVip(id);
		}
	}
}
public plugin_cfg(){
	maxPlayers=get_maxplayers();
}
public SpawnedEventPreVip(id){
	g_speed[id]=false;
	skoki[id]=-1;
	show_vip_menu(id);
	new g_Model[64];
	formatex(g_Model,charsmax(g_Model),"%s",get_user_team(id) == 1 ? "VipTT" : "VipCT");
	cs_set_user_model(id,g_Model);
}
public RoundEnd(){
	for(new i=1; i<=maxPlayers; ++i){
		g_speed[i]=false;
		if(is_user_alive(i)){
			fw_Player_ResetMaxSpeedVip(i);
		}
	}
	for(new i=1; i<=maxPlayers; ++i){
		skoki[i]=-1;
	}
	for(new i = 1; i <= maxPlayers; i++){
		if(is_user_alive(i) && g_Vip[i]){
			cs_set_user_money(i,cs_get_user_money(i) + 500);
		}
	}
}
public menu_1_handler(id){
	g_speed[id]=true;
	set_user_maxspeed(id,get_user_maxspeed(id) + 50);
	skoki[id]=1;
	set_user_health(id, get_user_health(id)+20);
	cs_set_user_armor(id, min(cs_get_user_armor(id,armortype)+150, 400), armortype);
	cs_set_user_money(id, min(cs_get_user_money(id)+800, 16000), 1);
	new henum=(user_has_weapon(id,CSW_HEGRENADE)?cs_get_user_bpammo(id,CSW_HEGRENADE):0);
	if(!henum && henum<2){
		give_item(id, "weapon_hegrenade");
		++henum;
	}
	cs_set_user_bpammo(id, CSW_HEGRENADE, min(2, henum+2));
	new fbnum=(user_has_weapon(id,CSW_FLASHBANG)?cs_get_user_bpammo(id,CSW_FLASHBANG):0);
	if(!fbnum && fbnum<3){
		give_item(id, "weapon_flashbang");
		++fbnum;
	}
	cs_set_user_bpammo(id, CSW_FLASHBANG, min(3, fbnum+3));
	new sgnum=(user_has_weapon(id,CSW_SMOKEGRENADE)?cs_get_user_bpammo(id,CSW_SMOKEGRENADE):0);
	if(!sgnum && sgnum<3){
		give_item(id, "weapon_smokegrenade");
		++sgnum;
	}
	cs_set_user_bpammo(id, CSW_SMOKEGRENADE, min(3, sgnum+3));
	StripWeapons(id, Secondary);
	give_item(id, "weapon_deagle");
	give_item(id, "ammo_50ae");
	weapon_id=find_ent_by_owner(-1, "weapon_deagle", id);
	if(weapon_id)cs_set_weapon_ammo(weapon_id, 10);
	cs_set_user_bpammo(id, CSW_DEAGLE, 40);
	StripWeapons(id, Primary);
	give_item(id, "weapon_m4a1");
	give_item(id, "ammo_556nato");
	weapon_id=find_ent_by_owner(-1, "weapon_m4a1", id);
	if(weapon_id)cs_set_weapon_ammo(weapon_id, 30);
	cs_set_user_bpammo(id, CSW_M4A1, 90);
	give_item(id, "item_thighpack");
	cs_set_user_nvg(id);
}
public menu_2_handler(id){
	g_speed[id]=true;
	set_user_maxspeed(id,get_user_maxspeed(id) + 50);
	skoki[id]=1;
	set_user_health(id, get_user_health(id)+20);
	cs_set_user_armor(id, min(cs_get_user_armor(id,armortype)+150, 400), armortype);
	cs_set_user_money(id, min(cs_get_user_money(id)+800, 16000), 1);
	new henum=(user_has_weapon(id,CSW_HEGRENADE)?cs_get_user_bpammo(id,CSW_HEGRENADE):0);
	if(!henum && henum<2){
		give_item(id, "weapon_hegrenade");
		++henum;
	}
	cs_set_user_bpammo(id, CSW_HEGRENADE, min(2, henum+2));
	new fbnum=(user_has_weapon(id,CSW_FLASHBANG)?cs_get_user_bpammo(id,CSW_FLASHBANG):0);
	if(!fbnum && fbnum<3){
		give_item(id, "weapon_flashbang");
		++fbnum;
	}
	cs_set_user_bpammo(id, CSW_FLASHBANG, min(3, fbnum+3));
	new sgnum=(user_has_weapon(id,CSW_SMOKEGRENADE)?cs_get_user_bpammo(id,CSW_SMOKEGRENADE):0);
	if(!sgnum && sgnum<3){
		give_item(id, "weapon_smokegrenade");
		++sgnum;
	}
	cs_set_user_bpammo(id, CSW_SMOKEGRENADE, min(3, sgnum+3));
	StripWeapons(id, Secondary);
	give_item(id, "weapon_deagle");
	give_item(id, "ammo_50ae");
	weapon_id=find_ent_by_owner(-1, "weapon_deagle", id);
	if(weapon_id)cs_set_weapon_ammo(weapon_id, 10);
	cs_set_user_bpammo(id, CSW_DEAGLE, 40);
	StripWeapons(id, Primary);
	give_item(id, "weapon_ak47");
	give_item(id, "ammo_762nato");
	weapon_id=find_ent_by_owner(-1, "weapon_ak47", id);
	if(weapon_id)cs_set_weapon_ammo(weapon_id, 30);
	cs_set_user_bpammo(id, CSW_AK47, 90);
	give_item(id, "item_thighpack");
	cs_set_user_nvg(id);
}
public menu_3_handler(id){
	g_speed[id]=true;
	set_user_maxspeed(id,get_user_maxspeed(id) + 50);
	skoki[id]=1;
	set_user_health(id, get_user_health(id)+20);
	cs_set_user_armor(id, min(cs_get_user_armor(id,armortype)+150, 400), armortype);
	cs_set_user_money(id, min(cs_get_user_money(id)+800, 16000), 1);
	new henum=(user_has_weapon(id,CSW_HEGRENADE)?cs_get_user_bpammo(id,CSW_HEGRENADE):0);
	if(!henum && henum<2){
		give_item(id, "weapon_hegrenade");
		++henum;
	}
	cs_set_user_bpammo(id, CSW_HEGRENADE, min(2, henum+2));
	new fbnum=(user_has_weapon(id,CSW_FLASHBANG)?cs_get_user_bpammo(id,CSW_FLASHBANG):0);
	if(!fbnum && fbnum<3){
		give_item(id, "weapon_flashbang");
		++fbnum;
	}
	cs_set_user_bpammo(id, CSW_FLASHBANG, min(3, fbnum+3));
	new sgnum=(user_has_weapon(id,CSW_SMOKEGRENADE)?cs_get_user_bpammo(id,CSW_SMOKEGRENADE):0);
	if(!sgnum && sgnum<3){
		give_item(id, "weapon_smokegrenade");
		++sgnum;
	}
	cs_set_user_bpammo(id, CSW_SMOKEGRENADE, min(3, sgnum+3));
	StripWeapons(id, Secondary);
	give_item(id, "weapon_deagle");
	give_item(id, "ammo_50ae");
	weapon_id=find_ent_by_owner(-1, "weapon_deagle", id);
	if(weapon_id)cs_set_weapon_ammo(weapon_id, 10);
	cs_set_user_bpammo(id, CSW_DEAGLE, 40);
	StripWeapons(id, Primary);
	give_item(id, "weapon_awp");
	give_item(id, "ammo_338magnum");
	weapon_id=find_ent_by_owner(-1, "weapon_awp", id);
	if(weapon_id)cs_set_weapon_ammo(weapon_id, 10);
	cs_set_user_bpammo(id, CSW_AWP, 30);
	give_item(id, "item_thighpack");
	cs_set_user_nvg(id);
}
public menu_4_handler(id){
	g_speed[id]=true;
	set_user_maxspeed(id,get_user_maxspeed(id) + 50);
	skoki[id]=1;
	set_user_health(id, get_user_health(id)+20);
	cs_set_user_armor(id, min(cs_get_user_armor(id,armortype)+150, 400), armortype);
	cs_set_user_money(id, min(cs_get_user_money(id)+800, 16000), 1);
	new henum=(user_has_weapon(id,CSW_HEGRENADE)?cs_get_user_bpammo(id,CSW_HEGRENADE):0);
	if(!henum && henum<2){
		give_item(id, "weapon_hegrenade");
		++henum;
	}
	cs_set_user_bpammo(id, CSW_HEGRENADE, min(2, henum+2));
	new fbnum=(user_has_weapon(id,CSW_FLASHBANG)?cs_get_user_bpammo(id,CSW_FLASHBANG):0);
	if(!fbnum && fbnum<3){
		give_item(id, "weapon_flashbang");
		++fbnum;
	}
	cs_set_user_bpammo(id, CSW_FLASHBANG, min(3, fbnum+3));
	new sgnum=(user_has_weapon(id,CSW_SMOKEGRENADE)?cs_get_user_bpammo(id,CSW_SMOKEGRENADE):0);
	if(!sgnum && sgnum<3){
		give_item(id, "weapon_smokegrenade");
		++sgnum;
	}
	cs_set_user_bpammo(id, CSW_SMOKEGRENADE, min(3, sgnum+3));
	StripWeapons(id, Secondary);
	give_item(id, "weapon_deagle");
	give_item(id, "ammo_50ae");
	weapon_id=find_ent_by_owner(-1, "weapon_deagle", id);
	if(weapon_id)cs_set_weapon_ammo(weapon_id, 10)
			
		

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