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 z1rwc35mbtcc dodana przez speedkill, 15.08.2012 22:34
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.
302.
303.
304.
305.
306.
307.
308.
309.
310.
311.
312.
313.
314.
315.
316.
317.
318.
319.
320.
321.
322.
323.
324.
325.
326.
327.
328.
329.
330.
331.
332.
333.
334.
335.
336.
337.
338.
339.
340.
341.
342.
343.
344.
345.
346.
347.
348.
349.
350.
351.
352.
353.
354.
355.
356.
357.
358.
359.
360.
361.
362.
363.
364.
365.
366.
367.
368.
369.
370.
371.
372.
373.
374.
375.
376.
377.
378.
379.
380.
381.
382.
383.
384.
385.
386.
387.
388.
389.
390.
391.
392.
393.
394.
395.
396.
397.
398.
399.
400.
401.
402.
403.
404.
405.
406.
407.
408.
409.
410.
411.
412.
413.
414.
415.
416.
417.
418.
419.
420.
421.
422.
423.
424.
425.
/********************************************************************************
*  AMX Mod X script.
*
*   Ultimate Sounds (Ultimate_Sounds.sma)
*   Copyright © 2006-2008 Bmann_420 / Dizzy / Hoboman
*
*   This program is free software; you can redistribute it and/or
*   modify it under the terms of the GNU General Public License
*   as published by the Free Software Foundation; either version 2
*   of the License, or (at your option) any later version.
*
*   This program is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details.
*
*   You should have received a copy of the GNU General Public License
*   along with this program; if not, write to the Free Software
*   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*
*   In addition, as a special exception, the author gives permission to
*   link the code of this program with the Half-Life Game Engine ("HL
*   Engine") and Modified Game Libraries ("MODs") developed by Valve,
*   L.L.C ("Valve"). You must obey the GNU General Public License in all
*   respects for all of the code used other than the HL Engine and MODs
*   from Valve. If you modify this file, you may extend this exception
*   to your version of the file, but you are not obligated to do so. If
*   you do not wish to do so, delete this exception statement from your
*   version.
*
*********************************************************************************
*
*   AMXX Ultimate Sounds Vers. 1.7
*   Last Update: 1/26/2007
*
*   by  Dizzy / Bmann_420 & Hoboman
*   Link: Ultimate Sounds (The Original) - AlliedModders
*
*
*********************************************************************************
*
* ///////////////////////////////////////////////////
* //  AMXMOD[X] //
* //   ::Ultimate sounds:: //
* // Origional: by Hephaistos //
* // Ported by: Dizzy //
* // Edited by: Hoboman, bmann_420 //
* //    //
* // cvar: //
* //  streak_mode < flags > //
* //  "a" - messages    //
* //  "b" - sounds //
* //    //
* //  knife_mode < flags > //
* //  "a" - messages    //
* //  "b" - sounds //
* //    //
* //  hs_mode < flags > //
* //  "a" - messages    //
* //  "b" - sounds //
* //    //
* //  lastman_mode < flags >    //
* //  "a" - messages    //
* //  "b" - hp //
* //  "c" - sounds //
* ///////////////////////////////////////////////////
*
*********************************************************************************
*/
 
// Plugin Info
new const PLUGIN[]  = "Ultimate Sounds"
new const VERSION[] = "1.7"
new const AUTHOR[]  = "Dizzy / Bmann_420"
 
// Includes
#include <amxmodx>
 
//Defines
#define KNIFEMESSAGES 5
#define MESSAGESNOHP 5
#define MESSAGESHP 5
#define LEVELS 10
 
//Pcvars
new streak_mode, knife_mode, hs_mode, lastman_mode
 
new gmsgHudSync
 
new kills[33] = {0,...};
new deaths[33] = {0,...};
new alone_ann = 0
new levels[10] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
 
//Streak Sounds
new stksounds[10][] ={
	"misc/multikill",
	"misc/megakill",
	"misc/ultrakill",
	"misc/monsterkill",
	"misc/killingspree",
	"misc/wickedsick",
	"misc/rampage",
	"misc/ludacrisskill",
	"misc/godlike",
	"misc/holyshit"
}
 
new stkmessages[10][] ={
	"%s: Multi-Kill!",
	"%s: Mega-Kill!",
	"%s: Ultra-Kill!",
	"%s: Monster-Kill!",
	"%s: Killing Spree!",
	"%s: Wicked Sick!",
	"%s: Rampage!",
	"%s: Ludacriss-Kill",
	"%s: Godlike!",
	"%s: Holy Shit!"
}
 
new knifemessages[KNIFEMESSAGES][] ={
	"KNIFE_MSG_1",  
	"KNIFE_MSG_2",  
	"KNIFE_MSG_3",  
	"KNIFE_MSG_4",  
	"KNIFE_MSG_5"
}
 
new messagesnohp[MESSAGESNOHP][] ={
	"NOHP_MSG_1",  
	"NOHP_MSG_2",  
	"NOHP_MSG_3",  
	"NOHP_MSG_4",  
	"NOHP_MSG_5"
}
 
new messageshp[MESSAGESHP][] ={
	"HP_MSG_1",  
	"HP_MSG_2",  
	"HP_MSG_3",  
	"HP_MSG_4",  
	"HP_MSG_5"
}
 
new g_Music[33]
 
public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_cvar("ultimate_sounds",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
	register_dictionary("ultimate_sounds.txt")
	register_event("DeathMsg","hs","a","3=1")
	register_event("DeathMsg","knife_kill","a","4&kni")
	register_event("ResetHUD", "reset_hud", "b");
	register_event("DeathMsg", "death_event", "a", "1>0");
	register_event("DeathMsg","death_msg","a")
	register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
	register_event("TextMsg","roundend_msg","a","2&#Game_C","2&#Game_w")
	register_clcmd("say /play","g_Play")
	register_clcmd("say /stop","g_Stop")
 
	lastman_mode = register_cvar("lastman_mode","abc")
	streak_mode = register_cvar("streak_mode","ab")
	knife_mode = register_cvar("knife_mode","ab")
	hs_mode = register_cvar("hs_mode","ab")
 
	gmsgHudSync = CreateHudSyncObj()
 
	return PLUGIN_CONTINUE
}
public g_Play(id)
	g_Music[id] = true
 
public g_Stop(id)
	g_Music[id] = false
 
public get_streak()
{
	new streak[3]
	get_pcvar_string(streak_mode,streak,2)
	return read_flags(streak)
}
 
public death_event(id)
{
	new streak = get_streak()
 
	if ((streak&1) || (streak&2))
	{
		new killer = read_data(1);
		new victim = read_data(2);
 
		kills[killer] += 1;
		kills[victim] = 0;
		deaths[killer] = 0;
		deaths[victim] += 1;
 
		for (new i = 0; i < LEVELS; i++)
		{
			if (kills[killer] == levels[i])
			{
				announce(killer, i);
				return PLUGIN_CONTINUE;
			}
		}
	}
	return PLUGIN_CONTINUE;
}
 
public announce(killer, level)
{
	new streak = get_streak()
 
	if (streak&1)
	{
		new name[32];
 
		get_user_name(killer, name, 32);
		set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2);
		ShowSyncHudMsg(0, gmsgHudSync, stkmessages[level], name);
	}
 
	if (streak&2){
		for(new i=1;i<=get_maxplayers();i++)
		{
			if(is_user_connected(i) && g_Music[i])
				client_cmd(i, "spk %s", stksounds[level]);
		}
	}
}
 
public reset_hud(id)
{
	new streak = get_streak()
 
	if (streak&1)
	{
 
		if (kills[id] > levels[0])
 
	{
		client_print(id, print_chat,"%L", id, "KILL_STREAK", kills[id]);
	}
 
	else if(deaths[id] > 1)
	{
		client_print(id, print_chat,"%L", id, "DEATH_STREAK", deaths[id]);
	}
}
}
 
public client_connect(id)
{
	new streak = get_streak()
 
	if ((streak&1) || (streak&2))
	{
		kills[id] = 0;
		deaths[id] = 0;
	}
}
 
public knife_kill()
{
	new knifemode[4]
	get_pcvar_string(knife_mode,knifemode,4)
	new knifemode_bit = read_flags(knifemode)
 
	if (knifemode_bit & 1)
	{
		new killer_id = read_data(1)
		new victim_id = read_data(2)
		new killer_name[33], victim_name[33]
 
		get_user_name(killer_id,killer_name,33)
		get_user_name(victim_id,victim_name,33)
 
 
		set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
		ShowSyncHudMsg(0, gmsgHudSync, "%L", LANG_PLAYER, knifemessages[ random_num(0,KNIFEMESSAGES-1) ],killer_name,victim_name)
	}
 
	if (knifemode_bit & 2)
	{
		for(new i=1;i<=get_maxplayers();i++)
 
			if(is_user_connected(i) && g_Music[i])
				client_cmd(i,"spk misc/humiliation")
		}
	}
 
 
	public roundend_msg(id)
 
	alone_ann = 0
 
	public death_msg(id)
	{
 
		new lmmode[8]
		get_pcvar_string(lastman_mode,lmmode,8)
		new lmmode_bit = read_flags(lmmode)
 
		new players_ct[32], players_t[32], ict, ite, last
		get_players(players_ct,ict,"ae","CT")  
		get_players(players_t,ite,"ae","TERRORIST")  
 
		if (ict==1&&ite==1)
		{
			new name1[32], name2[32]
			get_user_name(players_ct[0],name1,32)
			get_user_name(players_t[0],name2,32)
			set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
 
			if (lmmode_bit & 1)
			{
				if (lmmode_bit & 2)
				{
					ShowSyncHudMsg(0, gmsgHudSync, "%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))
				}
 
				else
				{
					ShowSyncHudMsg(0, gmsgHudSync, "%s vs. %s",name1,name2)
				}
 
				if (lmmode_bit & 4)
				{
					for(new i=1;i<=get_maxplayers();i++)
						if(is_user_connected(i) && g_Music[i])
						client_cmd(i,"spk misc/maytheforce")
				}
			}
		}
		else
		{  
			if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
			{
				last=players_ct[0]
				if(g_Music[last])
					client_cmd(last,"spk misc/oneandonly")
 
			}
 
			else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
			{
				last=players_t[0]
				if(g_Music[last])
					client_cmd(last,"spk misc/oneandonly")
			}
 
			else
			{
				return PLUGIN_CONTINUE
			}
			alone_ann = last
			new name[32]  
			get_user_name(last,name,32)
 
			if (lmmode_bit & 1)
			{
				set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
 
				if (lmmode_bit & 2)
				{
					ShowSyncHudMsg(0, gmsgHudSync, "%L", LANG_PLAYER, messageshp[ random_num(0,MESSAGESHP-1) ],ite ,ict ,name,get_user_health(last))
				}
 
				else
				{
					ShowSyncHudMsg(0, gmsgHudSync, "%L", LANG_PLAYER, messagesnohp[ random_num(0,MESSAGESNOHP-1) ],ite ,ict ,name )
				}
			}
 
		}
		return PLUGIN_CONTINUE  
	}
 
 
	public hs()
	{
		new hsmode[4]
		get_pcvar_string(hs_mode,hsmode,4)
		new hsmode_bit = read_flags(hsmode)
 
		if (hsmode_bit & 1)
		{
			new killer_id = read_data(1)
			new victim_id = read_data(2)
			new victim_name[33]
 
			get_user_name(victim_id,victim_name,33)
 
			set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 3.0, 3.0, 0.15, 0.15, 1)
			ShowSyncHudMsg(killer_id, gmsgHudSync, "::HEADSHOT::^nYou Owned %s !!",victim_name)
		}
 
		if (hsmode_bit & 2)
		{
			for(new i=1;i<=get_maxplayers();i++)
				if(is_user_connected(i) && g_Music[i])
				client_cmd(i,"spk misc/headshot")
		}
	}
 
	public plugin_precache()
	{
		precache_sound("misc/monsterkill.wav")
		precache_sound("misc/godlike.wav")
		precache_sound("misc/headshot.wav")
		precache_sound("misc/humiliation.wav")
		precache_sound("misc/killingspree.wav")
		precache_sound("misc/multikill.wav")
		precache_sound("misc/ultrakill.wav")
		precache_sound("misc/maytheforce.wav")
		precache_sound("misc/oneandonly.wav")
		precache_sound("misc/rampage.wav")
		precache_sound("misc/holyshit.wav")
		precache_sound("misc/megakill.wav")
		precache_sound("misc/wickedsick.wav")
		precache_sound("misc/ludacrisskill.wav")
 
		return PLUGIN_CONTINUE
	}

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