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. | /* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#include <fakemeta_util>
#define PLUGIN "VIP CODMOD"
#define VERSION "99999.0"
#define AUTHOR "HubertTM"
#define VIP ADMIN_LEVEL_H // tutaj zmieniasz flage i git
static const COLOR[] = "^x04"
new maxplayers
new gmsgSayText
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say", "handle_say")
gmsgSayText = get_user_msgid("SayText")
maxplayers = get_maxplayers();
register_event("DeathMsg", "DeathMsg", "a")
RegisterHam(Ham_Spawn, "player", "Odrodzenie", 1);
register_clcmd("say /vip","admin_motd",0,"- Pokazuje MOTD") // komenda /vip bedzie dzialac jak wrzucisz vipinfo.txt do cstrike i tam wpiszesz dane o vipie
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public client_connect(id) {
new vipname[32];
get_user_name(id,vipname,31)
if(get_user_flags(id) & VIP) {
set_hudmessage(42, 255, 85, -1.0, 0.2, 0, 6.0, 12.0)
show_hudmessage(id, "Gracz %s jest vipem . ^n Witamy", vipname)
}
}
public handle_say(id)
{
new said[192]
read_args(said,192)
if(( containi(said, "who") != -1 && containi(said, "admin") != -1) || contain(said, "/vips") != -1)
set_task(0.1,"print_viplist", id)
return PLUGIN_CONTINUE
}
public print_viplist(user)
{
new adminnames[33][32]
new message[256]
new id, count, x, len
for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & VIP)
get_user_name(id, adminnames[count++], 31)
len = format(message, 255, "%s VIP-y Online: ",COLOR)
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "Brak VIP-ow Online.")
print_message(user, message)
}
}
print_message(id, msg[])
{
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
public DeathMsg()
{
new kid = read_data(1) //zabojca
new hs = read_data(3) // HeadShot (1 == true)
if(get_user_flags(kid) & VIP) {
set_user_health(kid,get_user_health(kid)+15)
}
if(get_user_flags(kid) & VIP || hs == 1) {
set_user_health(kid,get_user_health(kid)+35)
}
}
public admin_motd(id,level,cid) {
if (!cmd_access(id,level,cid,1))
return PLUGIN_CONTINUE
show_motd(id,"infovip.txt","Informacje o vipie") // stworz plik infovip.txt w cstrike i wpisz tam swoj tekst o vipie /vip
return PLUGIN_CONTINUE
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
new health = get_user_health(this);
new weapon = get_user_weapon(idattacker);
if(weapon == CSW_HEGRENADE){
if(get_user_flags(idattacker) & VIP && random(10) == 1)
damage = float(health);
}
if(weapon == CSW_M4A1){
if(get_user_flags(idattacker) & VIP && random(10) == 1)
damage = float(health);
}
if(weapon == CSW_AK47){
if(get_user_flags(idattacker) & VIP && random(10) == 1)
damage = float(health);
}
if(weapon == CSW_DEAGLE){
if(get_user_flags(idattacker) & VIP && random(4) == 1)
damage = float(health);
}
}
|