Пользователь
- Сообщения
- 1
- Реакции
- -7
Поиск плагина Модель ножа Karambit с доп.уроном.
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#if !defined MAX_PLAYERS
const MAX_PLAYERS = 32;
#endif
const m_pPlayer = 41;
new const PLUGIN_NAME[] = "Custom Knife";
new const PLUGIN_VERSION[] = "0.0.1";
new const WEAPON_VIEW_MODEL[] = "models/custom/v_knife.mdl";
new const WEAPON_PLAYER_MODEL[] = "models/custom/p_knife.mdl";
new bool: g_bHasCustomKnife[MAX_PLAYERS + 1];
new g_sAllocStringViewModel;
new g_sAllocStringPlayerModel;
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, "AddAnyAuthor");
RegisterHam(Ham_Item_Deploy, "weapon_knife", "@CWeapon_Deploy_Post", .Post = 1);
register_clcmd("say /giveknife", "@Command_GiveKnife");
}
public plugin_precache()
{
engfunc(EngFunc_PrecacheModel, WEAPON_VIEW_MODEL);
engfunc(EngFunc_PrecacheModel, WEAPON_PLAYER_MODEL);
g_sAllocStringViewModel = engfunc(EngFunc_AllocString, WEAPON_VIEW_MODEL);
g_sAllocStringPlayerModel = engfunc(EngFunc_AllocString, WEAPON_PLAYER_MODEL);
}
public client_disconnect(iPlayer)
{
g_bHasCustomKnife[iPlayer] = false;
}
@CWeapon_Deploy_Post(iItem)
{
new iPlayer; iPlayer = get_pdata_cbase(iItem, m_pPlayer, 4);
if(!g_bHasCustomKnife[iPlayer])
{
return;
}
set_pev_string(iPlayer, pev_viewmodel2, g_sAllocStringViewModel);
set_pev_string(iPlayer, pev_weaponmodel2, g_sAllocStringPlayerModel);
}
@Command_GiveKnife(iPlayer)
{
g_bHasCustomKnife[iPlayer] = true;
}
steelzzz, инфа о том, что пушка кастомная хранится в игроке, плагин неоч.@steelzzz, реапи нет, плугин неоч.