Пользователь
- Сообщения
- 0
- Реакции
- 0
Подскажите есть ли админ нож(для паблика) который бы по определённому флаку включал в себя: Гравитацию, Скорость, банихоп, и урон? Заранее спасибо
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
new const PLUGIN_NAME[] = "[AMXX] Admin Knife";
new const PLUGIN_VERSION[] = "0.0.1";
new const g_szFlagAccess[] = "t";
new Float: g_flMultiDamage = 2.0;
new Float: g_flSpeed = 350.0;
new Float: g_flGravity = 0.7;
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, "steelzorrr (for dev-cs.ru)");
RegisterHam(Ham_TakeDamage, "player", "CPlayer_TakeDamage_Pre", .Post = false);
RegisterHam(Ham_CS_Player_ResetMaxSpeed, "player", "CPlayer_ResetMaxSpeed_Pre", .Post = false);
}
public CPlayer_ResetMaxSpeed_Pre(iPlayer)
{
if(!is_user_connected(iPlayer))
{
return HAM_IGNORED;
}
if((get_user_flags(iPlayer) & read_flags(g_szFlagAccess)) && get_user_weapon(iPlayer) == CSW_KNIFE)
{
set_pev(iPlayer, pev_maxspeed, g_flSpeed);
set_pev(iPlayer, pev_gravity, g_flGravity);
}
return HAM_IGNORED;
}
public CPlayer_TakeDamage_Pre(iVictim, iInflictor, iAttacker, Float: flDamage, iBitsDamage)
{
if(!is_user_connected(iAttacker) || iVictim == iAttacker)
{
return HAM_IGNORED;
}
if((get_user_flags(iAttacker) & read_flags(g_szFlagAccess)) && get_user_weapon(iAttacker) == CSW_KNIFE && iInflictor == iAttacker)
{
flDamage *= g_flMultiDamage;
SetHamParamFloat(4, flDamage);
}
return HAM_IGNORED;
}