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 6rpy6bw5rj8k dodana przez dasiek, 18.04.2013 18:22
Typ:



Boss Event
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.
/*
 
boss event amxx plugin © 2005 bes island
 
Uses team locking code © bardelot
 
 
 
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., 51 Franklin Street, Fifth Floor, Boston, MA
 
02110-1301, 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.
 
*/
 
#include <amxmodx>
 
#include <amxmisc>
 
#include <fun>
 
#include <cstrike>
 
 
 
new player, bossPower
 
new old_mp_autoteambalance, Float:old_mp_roundtime, Float:old_mp_buytime, old_mp_freezetime, old_mp_startmoney
 
 
 
public plugin_init(){
 
register_plugin("boss","1.17","bes island")
 
register_clcmd("amx_boss","cmdMakeBoss",ADMIN_SLAY,"<name or #userid> <power> - make player a boss. Power must be 201 to 999")
 
register_clcmd("amx_unboss","cmdUnmakeBoss",ADMIN_SLAY,"- end the boss event")
 
register_event("TeamScore","hook_teamscore","a")
 
register_menucmd(register_menuid("Team_Select"),(1<<0)|(1<<1)|(1<<4)|(1<<5),"hook_team_select")
 
register_menucmd(-2,(1<<0)|(1<<1)|(1<<4)|(1<<5),"hook_team_select")
 
player=0
 
}
 
 
 
public hook_team_select(id,key){
 
if((key==0)&&(player!=0)){
 
engclient_cmd(id,"chooseteam")
 
return PLUGIN_HANDLED
 
}
 
return PLUGIN_CONTINUE
 
}
 
 
 
public cmdUnmakeBoss(id,level,cid){
 
if(cmd_access(id,level,cid,1))set_task(5.0,"UnmakeBoss")
 
return PLUGIN_HANDLED
 
}
 
 
 
public hook_teamscore(){
 
new score=read_data(2)
 
if((score>0)&&(player!=0))UnmakeBoss()
 
return PLUGIN_CONTINUE
 
}
 
 
 
public UnmakeBoss(){
 
if(player==0)return
 
if(is_user_connected(player))
 
set_user_rendering(player,kRenderFxGlowShell,0,0,0,kRenderNormal,99)
 
player=0
 
set_cvar_num("mp_autoteambalance",old_mp_autoteambalance)
 
set_cvar_float("mp_roundtime",old_mp_roundtime)
 
set_cvar_float("mp_buytime",old_mp_buytime)
 
set_cvar_num("mp_freezetime",old_mp_freezetime)
 
set_cvar_num("mp_startmoney",old_mp_startmoney)
 
set_cvar_num("sv_restart",1)
 
}
 
 
 
public cmdMakeBoss(id,level,cid){
 
if(!cmd_access(id,level,cid,3))return PLUGIN_HANDLED
 
if(player!=0){
 
client_print(id,print_console,"There already exists a boss")
 
return PLUGIN_HANDLED
 
}
 
new arg[32]
 
read_argv(1,arg,31)
 
player=cmd_target(id,arg,6)
 
if(!player)return PLUGIN_HANDLED
 
read_argv(2,arg,31)
 
bossPower=max(201,min(999,str_to_num(arg)))
 
new players[32], num, i
 
get_players(players,num)
 
for(i=0;i<num;i++)
 
if(players[i]!=player){
 
get_user_team(players[i],arg,31)
 
if(arg[0]!='S')cs_set_user_team(players[i],CS_TEAM_CT)
 
}else
 
cs_set_user_team(player,CS_TEAM_T,CS_T_GUERILLA);
 
old_mp_autoteambalance=get_cvar_num("mp_autoteambalance")
 
old_mp_roundtime=get_cvar_float("mp_roundtime")
 
old_mp_buytime=get_cvar_float("mp_buytime")
 
old_mp_startmoney=get_cvar_num("mp_startmoney")
 
old_mp_freezetime=get_cvar_num("mp_freezetime")
 
set_cvar_num("mp_autoteambalance",0)
 
set_cvar_num("mp_roundtime",9)
 
set_cvar_num("mp_startmoney",16000)
 
set_cvar_num("sv_restart",1)
 
set_cvar_float("mp_buytime",0.2)
 
set_cvar_num("mp_freezetime",12)
 
set_task(13.0,"MakeBoss2")
 
return PLUGIN_HANDLED
 
}
 
 
 
public MakeBoss2(){
 
if(is_user_connected(player)){
 
set_user_health(player,bossPower)
 
set_user_armor(player,100)
 
set_user_rendering(player,kRenderFxGlowShell,255,0,0,kRenderNormal,99)
 
strip_user_weapons(player)
 
give_item(player,"weapon_knife")
 
give_item(player,"weapon_m249")
 
new i
 
for(i=0;i<7;i++)give_item(player,"ammo_556natobox")
 
}else
 
UnmakeBoss()
 
set_hudmessage(255,0,0)
 
show_hudmessage(0,"The enemy is strong!")
 
}

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