Участник
Пользователь
- Сообщения
- 460
- Реакции
- 68
- Помог
- 7 раз(а)
- Ошибка
-
Помогите убрать Варн
- Компилятор
- Локальный
- Amx Mod X
- 1.9.0
- Исходный код
-
#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "Ultimate KillStreak Advanced"
#define PLUGIN_VERSION "0.7"
#define PLUGIN_AUTHOR "SAMURAI"
new kills[33] = {0,...};
new deaths[33] = {0,...};
new kill[33][24];
#define LEVELS 11
#define hsounds 2
#define maxdbsounds 2
#define TASK_CLEAR_KILL 100
new hsenable
new cvardouble
new killstreaktype
new levels[11] = {3, 5, 6, 7, 8, 9,10,11,12,13,14};
new sounds[11][] =
{
"ultimate_sounds/triplekill_ultimate",
"ultimate_sounds/multikill_ultimate",
"ultimate_sounds/ultrakill_ultimate",
"ultimate_sounds/killingspree_ultimate",
"ultimate_sounds/megakill_ultimate",
"ultimate_sounds/holyshit_ultimate",
"ultimate_sounds/ludicrouskill_ultimate",
"ultimate_sounds/rampage_ultimate",
"ultimate_sounds/wickedsick_ultimate",
"ultimate_sounds/unstoppable_ultimate",
"ultimate_sounds/monsterkill_ultimate"
};
new messages[11][] =
{
"%s: Triple Kill !",
"%s: Multi Kill !",
"%s: Ultra Kill !",
"%s: Killing Spree !",
"%s: Mega Kill !",
"%s: Holy Shit !",
"%s: Ludicrous Kill !",
"%s: Rampage !",
"%s: Wickedsick !",
"%s: Unstoppable !",
"%s: M o n s t e R K i L L ! ! !"
};
new hslist[hsounds][] =
{
"ultimate_sounds/headshot1_ultimate",
"ultimate_sounds/headshot2_ultimate"
}
new hsmessages[4][]=
{
".:HEADSHOT:.",
".:HEADSHOT:.",
".:HEADSHOT:.",
".:HEADSHOT:."
}
new doublelist[maxdbsounds][]=
{
"ultimate_sounds/doublekill1_ultimate",
"ultimate_sounds/doublekill2_ultimate"
}
is_mode_set(bits) {
new mode[9];
get_cvar_string("ut_killstreak_advanced", mode, 8);
return read_flags(mode) & bits;
}
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
killstreaktype = register_cvar("ut_killstreak_advanced", "3");
register_event("ResetHUD", "reset_hud", "b");
register_event("HLTV","rnstart","a", "1=0", "2=0");
register_event("DeathMsg", "event_death", "a");
hsenable = register_cvar("ut_killstreak_hs","1");
cvardouble = register_cvar("ut_doublekill_events","1");
return PLUGIN_CONTINUE;
}
public event_death(id) {
new killer = read_data(1);
new victim = read_data(2);
new headshot = read_data(3);
new weapon[24], vicname[32], killname[32]
read_data(4,weapon,23)
get_user_name(victim,vicname,31)
get_user_name(killer,killname,31)
if(headshot == 1 && get_pcvar_num(hsenable) ==1)
{
set_hudmessage(0, 255, 0, -1.0, 0.28, 2, 0.02, 6.0, 0.01, 0.1, 2)
show_hudmessage(killer, (hsmessages[random_num(0,3)]), killname, vicname)
new i
i = random_num(0,hsounds-1)
client_cmd(0,"spk %s",hslist[i])
}
if(kill[killer][0] && equal(kill[killer],weapon) && get_pcvar_num(cvardouble) == 1)
{
set_hudmessage(0, 255, 0, -1.0, 0.30, 0, 6.0, 6.0)
show_hudmessage(0,"Ooo My!!! %s made a Double Kill", killname)
kill[killer][0] = 0;
new q
q= random_num(0,maxdbsounds-1)
client_cmd(0,"spk %s",doublelist[q])
}
else
{
kill[killer] = weapon;
set_task(0.1,"clear_kill",TASK_CLEAR_KILL+killer);
}
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;
}
announce(killer, level)
{
new name[33]
new r = random(256)
new g = random(256)
new b = random(256)
get_user_name(killer, name, 32);
set_hudmessage(r,g,b, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2);
if( (get_pcvar_num(killstreaktype) <= 0 ) || get_pcvar_num(killstreaktype) > 3)
return PLUGIN_HANDLED;
if(get_pcvar_num(killstreaktype) == 1)
{
show_hudmessage(0, messages[level], name);
}
if(get_pcvar_num(killstreaktype) == 2)
{
client_cmd(0, "spk %s", sounds[level]);
}
if(get_pcvar_num(killstreaktype) == 3)
{
show_hudmessage(0, messages[level], name);
client_cmd(0, "spk %s", sounds[level]);
}
return PLUGIN_CONTINUE;
}
public client_connect(id) {
kills[id] = 0;
deaths[id] = 0;
}
public clear_kill(taskid)
{
new id = taskid-TASK_CLEAR_KILL;
kill[id][0] = 0;
}
public plugin_precache()
{
precache_sound("ultimate_sounds/triplekill_ultimate.wav")
precache_sound("ultimate_sounds/multikill_ultimate.wav")
precache_sound("ultimate_sounds/ultrakill_ultimate.wav")
precache_sound("ultimate_sounds/killingspree_ultimate.wav")
precache_sound("ultimate_sounds/megakill_ultimate.wav")
precache_sound("ultimate_sounds/holyshit_ultimate.wav")
precache_sound("ultimate_sounds/ludicrouskill_ultimate.wav")
precache_sound("ultimate_sounds/rampage_ultimate.wav")
precache_sound("ultimate_sounds/wickedsick_ultimate.wav")
precache_sound("ultimate_sounds/unstoppable_ultimate.wav")
precache_sound("ultimate_sounds/monsterkill_ultimate.wav")
precache_sound("ultimate_sounds/headshot1_ultimate.wav")
precache_sound("ultimate_sounds/headshot2_ultimate.wav")
precache_sound("ultimate_sounds/doublekill1_ultimate.wav")
precache_sound("ultimate_sounds/doublekill2_ultimate.wav")
}
Я исходник редактнул под себя и не получается убрать варн
Сори если не в ту тему но вроде и в ту)))
Сори если не в ту тему но вроде и в ту)))
В этой теме было размещено решение! Перейти к решению.