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. | #include <amxmodx>
#include <amxmisc>
#define PLUGIN "Interp ask"
#define VERSION "1.0"
#define AUTHOR "silversurfer thx r3x (mod. deLL)"
#define TASK_SHOWMENU 432
#define MYMENU_KEYS MENU_KEY_1|MENU_KEY_2|MENU_KEY_3
new Float:InterpPlayer[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_menu("InterpASK", MYMENU_KEYS, "InterpASK_Handler")
register_event("HLTV", "NowaRunda", "a", "1=0", "2=0");
}
public NowaRunda(){
new maxplayers = get_maxplayers()
for(new i = 0; i <= maxplayers; i++){
switch(InterpPlayer[i]){
case 0.01:
{
client_cmd(id, "ex_interp 0.01")
}
case 0.02:
{
client_cmd(id, "ex_interp 0.02")
}
case 0.03:
{
client_cmd(id, "ex_interp 0.03")
}
}
}
}
public client_putinserver(id)
{
if(!is_user_bot(id))
eventInGame(id)
}
public show_menu_(tid)
{
new id=tid-TASK_SHOWMENU;
new iTeam=get_user_team(id)
new menu_id, keys;
new menuUp = player_menu_info( id, menu_id, keys )
if ( iTeam && (menuUp <= 0 || menu_id < 0) )
SMenu(id)
else
set_task(1.0, "show_menu_", tid)
}
public eventInGame(id) set_task(1.0, "show_menu_", id+TASK_SHOWMENU);
public SMenu(id)
{
new menu_body[512]
format(menu_body, 511, "\wWybierz wartosc ex_interp^n^n\r1\y. \w ex_interp - 0.01^n\r2\y. \w ex_interp - 0.02^n\r3\y. \w ex_interp - 0.03")
show_menu(id, MYMENU_KEYS, menu_body, -1, "InterpASK")
}
public InterpASK_Handler(id, key)
{
new name[32]
get_user_name(id, name, 31)
switch(key)
{
case 0:{
client_cmd(id, "ex_interp 0.01")
client_cmd(id, "rate 25000")
client_cmd(id, "cl_updaterate 101")
client_cmd(id, "cl_cmdrate 101")
InterpPlayer[id] = 0.01
client_print(id, print_chat, "* Gracz ^"%s^" ustawil ex_interp na 0.01", name)
}
case 1:{
client_cmd(id, "ex_interp 0.02")
client_cmd(id, "rate 25000")
client_cmd(id, "cl_updaterate 101")
client_cmd(id, "cl_cmdrate 101")
InterpPlayer[id] = 0.02
client_print(id, print_chat, "* Gracz ^"%s^" ustawil ex_interp na 0.02", name)
}
case 2:{
client_cmd(id, "ex_interp 0.03")
client_cmd(id, "rate 25000")
client_cmd(id, "cl_updaterate 101")
client_cmd(id, "cl_cmdrate 101")
InterpPlayer[id] = 0.03
client_print(id, print_chat, "* Gracz ^"%s^" ustawil ex_interp na 0.03", name)
}
}
return PLUGIN_CONTINUE;
} |