Merhaba Arkadaşlar şöyle bir plugin var mı public için bombayı yetere atanın adı çıksın mesela şöyle Player adlı oyuncu C4 bombayı yere attı
https://www.youtube.com/c/HalayVakti
#include <amxmodx>
#include <reapi>
public plugin_init()
{
register_plugin("C4 Drop", "0.1", "LyNcH");
RegisterHookChain(RG_CWeaponBox_SetModel, "SetModel", .post = true);
}
public SetModel(const iEntity)
{
if (is_nullent(iEntity) || !isWeaponBoxC4(iEntity)) {
return HC_CONTINUE;
}
new iOwner = get_entvar(iEntity, var_owner);
if (!is_user_alive(iEntity)) {
return HC_CONTINUE;
}
client_print_color(0,0, "^3%n ^4adli oyuncu c4'u yere atti.", iOwner);
return HC_CONTINUE;
}
/* a2 & F@nt0M */
bool:isWeaponBoxC4(const ent)
{
for (new i = 0, weapon; i < MAX_ITEM_TYPES; i++)
{
weapon = get_member(ent, m_WeaponBox_rgpPlayerItems, i);
if (is_nullent(weapon))
{
continue;
}
new WeaponIdType:wid = get_member(weapon, m_iId);
if (wid == WEAPON_C4)
{
return true;
}
}
return false;
}