Добавлено спустя 1 минуту 7 секунд:
Файл biohazard_bioknife не компилируется, всё перепробовал ничего не получается.
Неинформативное название темы (изменено) // Subb98
Shadows In Rain писал(а): Юля-Юлечка, на технических форумах любая проблема решается оченнь легко. Нужно просто показать сиськи. С пруфами.
Модераторы: Subb98, liFe iS GoOD
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <biohazard>
#define PLUGIN "BIOKnife"
#define VERSION "1.0"
#define AUTHOR "ViniPux"
new usknife[33]=0
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /knife","cmdMenuKnife")
register_forward(FM_EmitSound, "fw_EmitSound")
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage")
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
}
public client_putinserver(id)
{
new mapname[32]
get_mapname(mapname, charsmax(mapname))
if(equali(mapname,"ze_",3))
{
usknife[id] = random_num(1,3)
} else
usknife[id] = random_num(1,4)
}
public Event_CurWeapon(player)
{
if(is_user_zombie(player))
return PLUGIN_CONTINUE
if(!usknife[player])
return PLUGIN_CONTINUE
if(!(get_user_flags(player) & ADMIN_RESERVATION) || !is_user_alive(player))
return PLUGIN_CONTINUE
if(read_data(2) != CSW_KNIFE)
set_user_gravity(player,1.0)
if(read_data(2) == CSW_KNIFE && usknife[player] == 4)
{
set_pev(player, pev_viewmodel2, "models/bioknife/v_stik.mdl")
set_pev(player, pev_weaponmodel2, "models/bioknife/p_stik.mdl")
set_user_gravity(player,1.0)
set_user_maxspeed(player,315.0)
}
if(read_data(2) == CSW_KNIFE && usknife[player] == 3)
{
set_pev(player, pev_viewmodel2, "models/bioknife/v_moto.mdl")
set_pev(player, pev_weaponmodel2, "models/bioknife/p_moto.mdl")
set_user_gravity(player,1.0)
set_user_maxspeed(player,255.0)
}
if(read_data(2) == CSW_KNIFE && usknife[player] == 1)
{
set_pev(player, pev_viewmodel2, "models/bioknife/v_hammer.mdl")
set_pev(player, pev_weaponmodel2, "models/bioknife/p_hammer.mdl")
set_user_gravity(player,1.0)
set_user_maxspeed(player,255.0)
}
if(read_data(2) == CSW_KNIFE && usknife[player] == 2)
{
set_pev(player, pev_viewmodel2, "models/bioknife/v_machete.mdl")
set_pev(player, pev_weaponmodel2, "models/bioknife/p_machete.mdl")
set_user_maxspeed(player,255.0)
}
return PLUGIN_CONTINUE
}
public plugin_precache()
{
precache_model("models/bioknife/v_moto.mdl")
precache_model("models/bioknife/v_hammer.mdl")
precache_model("models/bioknife/v_stik.mdl")
precache_model("models/bioknife/v_machete.mdl")
precache_model("models/bioknife/p_moto.mdl")
precache_model("models/bioknife/p_hammer.mdl")
precache_model("models/bioknife/p_stik.mdl")
precache_model("models/bioknife/p_machete.mdl")
precache_sound( "bioknife/strong/knife_slash1.wav" )
precache_sound( "bioknife/strong/knife_hit1.wav" )
precache_sound( "bioknife/strong/knife_hit2.wav" )
precache_sound( "bioknife/strong/knife_stab.wav" )
precache_sound( "bioknife/strong/knife_deploy1.wav" )
precache_sound( "bioknife/strong/frostnova.wav" )
precache_sound( "bioknife/moto/MTSlash.wav" )
precache_sound( "bioknife/moto/MTHitWall.wav" )
precache_sound( "bioknife/moto/MTStab.wav" )
precache_sound( "bioknife/moto/MTConvoca.wav" )
precache_sound( "bioknife/moto/MTHit2.wav" )
precache_sound( "bioknife/machete/machete_slash1.wav" )
precache_sound( "bioknife/machete/machete_hitwall1.wav" )
precache_sound( "bioknife/machete/machete_hit1.wav" )
precache_sound( "bioknife/machete/machete_stab.wav" )
precache_sound( "bioknife/machete/machete_draw.wav" )
precache_sound( "bioknife/hammer/knife_slash1_off.wav" )
precache_sound( "bioknife/hammer/hit2.wav" )
precache_sound( "bioknife/hammer/hit1.wav" )
precache_sound( "bioknife/hammer/knifedeploy.wav" )
precache_sound( "bioknife/hammer/knife_stab123.wav" )
}
public Player_TakeDamage(victim, inflicator, attacker, Float:damage, damage_type, bitsDamage)
{
if(is_user_zombie(attacker))
return;
if(!is_user_alive(attacker) || !is_user_alive(victim))
return;
if(get_user_weapon(attacker) != CSW_KNIFE)
return;
if(!(get_user_flags(attacker) & ADMIN_RESERVATION))
return;
if(is_user_zombie(attacker) != (is_user_zombie(victim) || is_user_infected(victim)))
{
if(pev(attacker, pev_button) & IN_ATTACK && usknife[attacker] == 1)
{
user_slap(victim, 0, 0)
user_slap(victim, 0, 0)
user_slap(victim, 0, 0)
}
if(pev(attacker, pev_button) & IN_ATTACK2 && sknife[attacker] == 1)
{
user_slap(victim, 0, 0)
user_slap(victim, 0, 0)
user_slap(victim, 0, 0)
user_slap(victim, 0, 0)
}
}
if(pev(attacker, pev_button) & IN_ATTACK && usknife[attacker] == 3)
{
if(get_user_team(attacker) == get_user_team(victim))
return;
SetHamParamFloat(4, damage = 300.0)
}
if(pev(attacker, pev_button) & IN_ATTACK2 && usknife[attacker] == 3)
{
if(get_user_team(attacker) == get_user_team(victim))
return;
SetHamParamFloat(4, damage = 300.0)
}
}
public fw_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)
{
if(!is_user_connected(id))
return FMRES_IGNORED;
if(!(get_user_flags(id) & ADMIN_RESERVATION))
return FMRES_IGNORED;
if(is_user_zombie(id))
return FMRES_IGNORED;
if (usknife[id] == 1 &&equal(sample[8], "kni", 3))
{
volume = 0.6;
if (equal(sample[14], "sla", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/hammer/knife_slash1_off.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/hammer/knifedeploy.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel,"bioknife/hammer/hit1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
else
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/hammer/hit2.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/hammer/knife_stab123.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (usknife[id] == 2 &&equal(sample[8], "kni", 3))
{
volume = 0.6;
if (equal(sample[14], "sla", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/machete/machete_slash1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/machete/machete_draw.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel,"bioknife/machete/machete_hitwall1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
else
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/machete/machete_hit1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/machete/machete_stab.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (usknife[id] == 3 &&equal(sample[8], "kni", 3))
{
volume = 0.6;
if (equal(sample[14], "sla", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/moto/MTSlash.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/moto/MTConvoca.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel,"bioknife/moto/MTHitWall.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
else
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/moto/MTHit2.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/moto/MTStab.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (usknife[id] == 4 &&equal(sample[8], "kni", 3))
{
volume = 0.6;
if (equal(sample[14], "sla", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/strong/knife_slash1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/strong/knife_deploy1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel,"bioknife/strong/knife_hit1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
else
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/strong/knife_hit2.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/strong/knife_stab.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
return FMRES_IGNORED;
}
public cmdMenuKnife(id)
{
if(!(get_user_flags(id) & ADMIN_RESERVATION))
{
client_printcolor(id,"/g[ /ctrONLY FOR VIP /g] /ybuy VIP account here: /ctrwww.ShooTzm.ru")
return PLUGIN_HANDLED
}
if(is_user_zombie(id))
{
client_printcolor(id,"/ctr* /yKnife только для людей/g.")
return PLUGIN_HANDLED
}
if(get_user_team(id) == 3 || !is_user_alive(id))
{
client_printcolor(id,"/ctr* /yKnife только для живых игроков/g.")
return PLUGIN_HANDLED
}
new menu = menu_create("\rVIP Knife Menu", "menu_knfe")
menu_additem(menu, "\yHammer \w(\dотскок\w)","1")
menu_additem(menu, "\yMachete \w(\dбаланс\w)","2")
menu_additem(menu, "\yPilLaaa \w(\dурон\w)","3")
menu_additem(menu, "\yStick \w(\dскорость\w)","4")
menu_setprop(menu, MPROP_EXITNAME, "Выход")
menu_setprop(menu, MPROP_EXIT,MEXIT_ALL)
menu_display(id,menu,0)
return PLUGIN_HANDLED
}
public menu_knfe(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64], access, callback
menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)
new name[32]
get_user_name(id,name,31)
new key = str_to_num(data)
switch(key)
{
case 1:{
if(is_user_zombie(id))
return PLUGIN_CONTINUE
engclient_cmd(id, "weapon_knife")
usknife[id]=1
set_pev(id, pev_viewmodel2, "models/bioknife/v_hammer.mdl")
set_pev(id, pev_weaponmodel2, "models/bioknife/p_hammer.mdl")
set_user_gravity(id,1.0)
set_user_maxspeed(id,255.0)
client_printcolor(id,"/ctr* /yТы взял /gHammer",name)
}
case 2:{
if(is_user_zombie(id))
return PLUGIN_CONTINUE
engclient_cmd(id, "weapon_knife")
usknife[id]=2
set_pev(id, pev_viewmodel2, "models/bioknife/v_machete.mdl")
set_pev(id, pev_weaponmodel2, "models/bioknife/p_machete.mdl")
set_user_maxspeed(id,255.0)
client_printcolor(id,"/ctr* /yТы взял /gMachete",name)
}
case 3:{
if(is_user_zombie(id))
return PLUGIN_CONTINUE
engclient_cmd(id, "weapon_knife")
usknife[id]=3
set_pev(id, pev_viewmodel2, "models/bioknife/v_moto.mdl")
set_pev(id, pev_weaponmodel2, "models/bioknife/p_moto.mdl")
set_user_gravity(id,1.0)
set_user_maxspeed(id,255.0)
client_printcolor(id,"/ctr* /yТы взял /gPilLyyy",name)
}
case 4:{
if(is_user_zombie(id))
return PLUGIN_CONTINUE
new mapname[32]
get_mapname(mapname, charsmax(mapname))
if(equali(mapname,"ze_",3))
{
client_printcolor(id,"/ctr* /yЭтот ножик запрещен на картах на прохождения/g.")
return PLUGIN_HANDLED
}
engclient_cmd(id, "weapon_knife")
usknife[id]=4
set_pev(id, pev_viewmodel2, "models/bioknife/v_stik.mdl")
set_pev(id, pev_weaponmodel2, "models/bioknife/p_stik.mdl")
set_user_gravity(id,1.0)
set_user_maxspeed(id,315.0)
client_printcolor(id,"/ctr* /yТы взял /gStik",name)
}
}
return PLUGIN_HANDLED
}
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, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
1. При вставке кода плагина необходимо использовать тег [code=php].
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
#pragma semicolon 1
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
#include <amxmodx>
#include <amxmisc>
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
public plugin_init() {
register_clcmd("say /hello", "cmdHello");
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
public cmdHello() {
client_print(0, print_chat, "Hello, world");
return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <biohazard>
#define PLUGIN "BIOKnife"
#define VERSION "1.0"
#define AUTHOR "ViniPux"
new usknife[33]=0
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /knife","cmdMenuKnife")
register_forward(FM_EmitSound, "fw_EmitSound")
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage")
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
}
public client_putinserver(id)
{
new mapname[32]
get_mapname(mapname, charsmax(mapname))
if(equali(mapname,"ze_",3))
{
usknife[id] = random_num(1,3)
} else
usknife[id] = random_num(1,4)
}
public Event_CurWeapon(player)
{
if(is_user_zombie(player))
return PLUGIN_CONTINUE
if(!usknife[player])
return PLUGIN_CONTINUE
if(!(get_user_flags(player) & ADMIN_RESERVATION) || !is_user_alive(player))
return PLUGIN_CONTINUE
if(read_data(2) != CSW_KNIFE)
set_user_gravity(player,1.0)
if(read_data(2) == CSW_KNIFE && usknife[player] == 4)
{
set_pev(player, pev_viewmodel2, "models/bioknife/v_stik.mdl")
set_pev(player, pev_weaponmodel2, "models/bioknife/p_stik.mdl")
set_user_gravity(player,1.0)
set_user_maxspeed(player,315.0)
}
if(read_data(2) == CSW_KNIFE && usknife[player] == 3)
{
set_pev(player, pev_viewmodel2, "models/bioknife/v_moto.mdl")
set_pev(player, pev_weaponmodel2, "models/bioknife/p_moto.mdl")
set_user_gravity(player,1.0)
set_user_maxspeed(player,255.0)
}
if(read_data(2) == CSW_KNIFE && usknife[player] == 1)
{
set_pev(player, pev_viewmodel2, "models/bioknife/v_hammer.mdl")
set_pev(player, pev_weaponmodel2, "models/bioknife/p_hammer.mdl")
set_user_gravity(player,1.0)
set_user_maxspeed(player,255.0)
}
if(read_data(2) == CSW_KNIFE && usknife[player] == 2)
{
set_pev(player, pev_viewmodel2, "models/bioknife/v_machete.mdl")
set_pev(player, pev_weaponmodel2, "models/bioknife/p_machete.mdl")
set_user_maxspeed(player,255.0)
}
return PLUGIN_CONTINUE
}
public plugin_precache()
{
precache_model("models/bioknife/v_moto.mdl")
precache_model("models/bioknife/v_hammer.mdl")
precache_model("models/bioknife/v_stik.mdl")
precache_model("models/bioknife/v_machete.mdl")
precache_model("models/bioknife/p_moto.mdl")
precache_model("models/bioknife/p_hammer.mdl")
precache_model("models/bioknife/p_stik.mdl")
precache_model("models/bioknife/p_machete.mdl")
precache_sound( "bioknife/strong/knife_slash1.wav" )
precache_sound( "bioknife/strong/knife_hit1.wav" )
precache_sound( "bioknife/strong/knife_hit2.wav" )
precache_sound( "bioknife/strong/knife_stab.wav" )
precache_sound( "bioknife/strong/knife_deploy1.wav" )
precache_sound( "bioknife/strong/frostnova.wav" )
precache_sound( "bioknife/moto/MTSlash.wav" )
precache_sound( "bioknife/moto/MTHitWall.wav" )
precache_sound( "bioknife/moto/MTStab.wav" )
precache_sound( "bioknife/moto/MTConvoca.wav" )
precache_sound( "bioknife/moto/MTHit2.wav" )
precache_sound( "bioknife/machete/machete_slash1.wav" )
precache_sound( "bioknife/machete/machete_hitwall1.wav" )
precache_sound( "bioknife/machete/machete_hit1.wav" )
precache_sound( "bioknife/machete/machete_stab.wav" )
precache_sound( "bioknife/machete/machete_draw.wav" )
precache_sound( "bioknife/hammer/knife_slash1_off.wav" )
precache_sound( "bioknife/hammer/hit2.wav" )
precache_sound( "bioknife/hammer/hit1.wav" )
precache_sound( "bioknife/hammer/knifedeploy.wav" )
precache_sound( "bioknife/hammer/knife_stab123.wav" )
}
public Player_TakeDamage(victim, inflicator, attacker, Float:damage, damage_type, bitsDamage)
{
if(is_user_zombie(attacker))
return;
if(!is_user_alive(attacker) || !is_user_alive(victim))
return;
if(get_user_weapon(attacker) != CSW_KNIFE)
return;
if(!(get_user_flags(attacker) & ADMIN_RESERVATION))
return;
if(is_user_zombie(attacker) != _:(is_user_zombie(victim) || is_user_infected(victim)))
{
if(pev(attacker, pev_button) & IN_ATTACK && usknife[attacker] == 1)
{
user_slap(victim, 0, 0)
user_slap(victim, 0, 0)
user_slap(victim, 0, 0)
}
if(pev(attacker, pev_button) & IN_ATTACK2 && usknife[attacker] == 1)
{
user_slap(victim, 0, 0)
user_slap(victim, 0, 0)
user_slap(victim, 0, 0)
user_slap(victim, 0, 0)
}
}
if(pev(attacker, pev_button) & IN_ATTACK && usknife[attacker] == 3)
{
if(get_user_team(attacker) == get_user_team(victim)) return;
SetHamParamFloat(4, damage = 300.0)
}
if(pev(attacker, pev_button) & IN_ATTACK2 && usknife[attacker] == 3)
{
if(get_user_team(attacker) == get_user_team(victim)) return;
SetHamParamFloat(4, damage = 300.0)
}
}
public fw_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)
{
if(!is_user_connected(id))
return FMRES_IGNORED;
if(!(get_user_flags(id) & ADMIN_RESERVATION))
return FMRES_IGNORED;
if(is_user_zombie(id))
return FMRES_IGNORED;
if (usknife[id] == 1 &&equal(sample[8], "kni", 3))
{
volume = 0.6;
if (equal(sample[14], "sla", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/hammer/knife_slash1_off.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/hammer/knifedeploy.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel,"bioknife/hammer/hit1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
else
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/hammer/hit2.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/hammer/knife_stab123.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (usknife[id] == 2 &&equal(sample[8], "kni", 3))
{
volume = 0.6;
if (equal(sample[14], "sla", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/machete/machete_slash1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/machete/machete_draw.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel,"bioknife/machete/machete_hitwall1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
else
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/machete/machete_hit1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/machete/machete_stab.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (usknife[id] == 3 &&equal(sample[8], "kni", 3))
{
volume = 0.6;
if (equal(sample[14], "sla", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/moto/MTSlash.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/moto/MTConvoca.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel,"bioknife/moto/MTHitWall.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
else
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/moto/MTHit2.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/moto/MTStab.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (usknife[id] == 4 &&equal(sample[8], "kni", 3))
{
volume = 0.6;
if (equal(sample[14], "sla", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/strong/knife_slash1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/strong/knife_deploy1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel,"bioknife/strong/knife_hit1.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
else
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/strong/knife_hit2.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "bioknife/strong/knife_stab.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}
return FMRES_IGNORED;
}
public cmdMenuKnife(id)
{
if(!(get_user_flags(id) & ADMIN_RESERVATION))
{
client_printcolor(id,"/g[ /ctrONLY FOR VIP /g] /ybuy VIP account here: /ctrwww.ShooTzm.ru")
return PLUGIN_HANDLED
}
if(is_user_zombie(id))
{
client_printcolor(id,"/ctr* /yKnife только для людей/g.")
return PLUGIN_HANDLED
}
if(get_user_team(id) == 3 || !is_user_alive(id))
{
client_printcolor(id,"/ctr* /yKnife только для живых игроков/g.")
return PLUGIN_HANDLED
}
new menu = menu_create("\rVIP Knife Menu", "menu_knfe")
menu_additem(menu, "\yHammer \w(\dотскок\w)","1")
menu_additem(menu, "\yMachete \w(\dбаланс\w)","2")
menu_additem(menu, "\yPilLaaa \w(\dурон\w)","3")
menu_additem(menu, "\yStick \w(\dскорость\w)","4")
menu_setprop(menu, MPROP_EXITNAME, "Выход")
menu_setprop(menu, MPROP_EXIT,MEXIT_ALL)
menu_display(id,menu,0)
return PLUGIN_HANDLED
}
public menu_knfe(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64], access, callback
menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)
new name[32]
get_user_name(id,name,31)
new key = str_to_num(data)
switch(key)
{
case 1:{
if(is_user_zombie(id))
return PLUGIN_CONTINUE
engclient_cmd(id, "weapon_knife")
usknife[id]=1
set_pev(id, pev_viewmodel2, "models/bioknife/v_hammer.mdl")
set_pev(id, pev_weaponmodel2, "models/bioknife/p_hammer.mdl")
set_user_gravity(id,1.0)
set_user_maxspeed(id,255.0)
client_printcolor(id,"/ctr* /yТы взял /gHammer",name)
}
case 2:{
if(is_user_zombie(id))
return PLUGIN_CONTINUE
engclient_cmd(id, "weapon_knife")
usknife[id]=2
set_pev(id, pev_viewmodel2, "models/bioknife/v_machete.mdl")
set_pev(id, pev_weaponmodel2, "models/bioknife/p_machete.mdl")
set_user_maxspeed(id,255.0)
client_printcolor(id,"/ctr* /yТы взял /gMachete",name)
}
case 3:{
if(is_user_zombie(id))
return PLUGIN_CONTINUE
engclient_cmd(id, "weapon_knife")
usknife[id]=3
set_pev(id, pev_viewmodel2, "models/bioknife/v_moto.mdl")
set_pev(id, pev_weaponmodel2, "models/bioknife/p_moto.mdl")
set_user_gravity(id,1.0)
set_user_maxspeed(id,255.0)
client_printcolor(id,"/ctr* /yТы взял /gPilLyyy",name)
}
case 4:{
if(is_user_zombie(id))
return PLUGIN_CONTINUE
new mapname[32]
get_mapname(mapname, charsmax(mapname))
if(equali(mapname,"ze_",3))
{
client_printcolor(id,"/ctr* /yЭтот ножик запрещен на картах на прохождения/g.")
return PLUGIN_HANDLED
}
engclient_cmd(id, "weapon_knife")
usknife[id]=4
set_pev(id, pev_viewmodel2, "models/bioknife/v_stik.mdl")
set_pev(id, pev_weaponmodel2, "models/bioknife/p_stik.mdl")
set_user_gravity(id,1.0)
set_user_maxspeed(id,315.0)
client_printcolor(id,"/ctr* /yТы взял /gStik",name)
}
}
return PLUGIN_HANDLED
}
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, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1251\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset204 Tahoma;}{\\ f1\\ fnil Tahoma;}}\n{\\ colortbl ;\\ red255\\ green0\\ blue0;\\ red0\\ green0\\ blue0;}\n\\ viewkind4\\ uc1\\ pard\\ cf1\\ lang1049\\ b\\ f0\\ fs16\\ 'cc\\ 'ee\\ 'e6\\ 'ed\\ 'ee \\ 'f7\\ 'f2\\ 'ee-\\ 'ed\\ 'e8\\ 'e1\\ 'f3\\ 'e4\\ 'fc \\ 'ed\\ 'e0\\ 'ea\\ 'e0\\ 'f2\\ 'e0\\ 'f2\\ 'fc, \\ 'e8 \\ 'e2\\ 'f1\\ 'e5 \\ 'ef\\ 'ee\\ 'f2\\ 'ee\\ 'ec \\ 'e1\\ 'f3\\ 'e4\\ 'f3\\ 'f2 \\ 'e2\\ 'e8\\ 'e4\\ 'e5\\ 'f2\\ 'fc.\n\\ par \n\\ par \\ cf2\\ b0\\ 'c5\\ 'f1\\ 'eb\\ 'e8 \\ 'e1\\ 'f3\\ 'e4\\ 'f3\\ 'f2 \\ 'e8\\ 'f1\\ 'ef\\ 'ee\\ 'eb\\ 'fc\\ 'e7\\ 'ee\\ 'e2\\ 'e0\\ 'f2\\ 'fc \\ 'f1\\ 'f2\\ 'f3\\ 'e4\\ 'e8\\ 'fe.\\ cf0\\ f1 \n\\ par }
*/
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 11