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. | /* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta_util>
#include <engine>
#define PLUGIN "Deathrun vip"
#define VERSION "2.0"
#define AUTHOR "michal"
#define ADMIN_VIP ADMIN_LEVEL_H
#define SCOREATTRIB_NONE 0
#define SCOREATTRIB_DEAD ( 1 << 0 )
#define SCOREATTRIB_BOMB ( 1 << 1 )
#define SCOREATTRIB_VIP ( 1 << 2 )
new SayTxT
#define ADMIN_CHECK ADMIN_LEVEL_H
new const ok[] = "misc/dr/ok.wav"
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam( Ham_Spawn, "player", "Bacon_Spawn", 1 );
RegisterHam(Ham_Spawn, "player", "Spawn", 1);
SayTxT = get_user_msgid("SayText");
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}
public plugin_precache() {
precache_model("models/player/smith/smith.mdl")
precache_sound(ok)
return PLUGIN_CONTINUE
}
public Spawn(id)
{
if(is_user_alive(id))
{
if(cs_get_user_team(id) == CS_TEAM_T)
{
menu(id)
}
if(cs_get_user_team(id) == CS_TEAM_CT)
{
menu1(id)
}
}
}
public menu(id)
{
new menu = menu_create("\r.::Vip menu::.", "wybieranie")
menu_additem(menu, "\rGrawitacja")
menu_additem(menu, "\wPredkosc")
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
menu_additem(menu, "\w65 \rHp")
menu_additem(menu, "\y100 \rPancerzu")
menu_additem(menu, "\yDeagle z 5 nabojami")
menu_additem(menu, "\rGranat Oslepiajacy + Wybuchowy")
menu_additem(menu, "\wNoktowizor", "5")
}
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
public wybieranie(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
switch(item)
{
case 0:
{
fm_set_user_gravity(id, 0.5)
client_printcolor(id, "/ctr[VIP] Wybrales grawitacje")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 1:
{
fm_set_user_maxspeed(id, 500.0)
client_printcolor(id, "/ctr[VIP] Wybrales predkosc")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 2:
{
set_user_health(id, get_user_health(id) + 65);
client_printcolor(id, "/ctr[VIP] Wybrales 65 Hp")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 3:
{
set_user_armor(id, get_user_armor(id) + 100)
client_printcolor(id, "/ctr[VIP] Wybrales 100 Pancerzu")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 4:
{
client_printcolor(id, "/ctr[VIP] Wybrales Deagle z 5 nabojami")
client_cmd(id, "spk %s", ok)
give_item(id, "weapon_deagle")
new weapon_id = find_ent_by_owner(-1, "weapon_deagle", id);
if(weapon_id)
{
cs_set_weapon_ammo(weapon_id, 5);
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 5:
{
fm_give_item(id, "weapon_hegrenade")
fm_give_item(id, "weapon_flashbang")
client_printcolor(id, "/ctr[VIP] Wybrales Granata Wybuchowego + Oslepiajacego")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 6:
{
cs_set_user_nvg(id)
client_printcolor(id, "/ctr[VIP] Wybrales Noktowizor")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
public handle_say(id) {
new said[192]
read_args(said,192)
if( ( containi(said, "who") != -1 && containi(said, "/vips") != -1 ) || contain(said, "/vip") != -1 )
set_task(0.1,"print_adminlist",id)
return PLUGIN_CONTINUE
}
public print_adminlist(user)
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len
for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_CHECK)
get_user_name(id, adminnames[count++], 31)
len = format(message, 255, "%s Vipy 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 vipow online")
print_message(user, message)
}
get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
print_message(user, contactinfo)
}
}
print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
stock client_printcolor(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg,190,input,3);
replace_all(msg,190,"/g","^4");// green txt
replace_all(msg,190,"/y","^1");// orange txt
replace_all(msg,190,"/ctr","^3");// team txt
replace_all(msg,190,"/w","^0");// team txt
if (id) players[0] = id; else get_players(players,count,"ch");
for (new i = 0; i < count; i++)
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, SayTxT, _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
public Bacon_Spawn(id) {
if (get_user_flags(id) & ADMIN_LEVEL_H) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "smith")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "smith")
}
else {
cs_reset_user_model(id)
}
}
}
public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
new iPlayer = get_msg_arg_int( 1 );
if( is_user_connected( iPlayer )
&& ( get_user_flags( iPlayer ) & ADMIN_VIP ) ) {
set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD );
}
}
|