I noticed that it inherits CBasePlayerItem/CBasePlayerWeapon members, but not the functions. Anyway, probably this would be useless, I was thinking to "hack" info_target entity and make custom weapons from it.
Somehow it's possible if you remove default CS weapons and work with a amxx "recoded" version of weapons.cpp:
Code:
new m_pActiveItem[MAX_PLAYERS+1];
public client_PostThink(this)
{
if (!is_user_alive(this))
return;
if (m_pActiveItem[this] != -1)
{
// Call "fake" post frame (Whatever_PostFrame)
ExecuteForward(ForwardPostFrame, _, m_pActiveItem[this]);
}
}
public Whatever_PostFrame(this)
{
static pPlayer;
pPlayer = get_ent_data_entity(this, "CBasePlayerItem", "m_pPlayer");
if (pev(pPlayer, pev_button) & IN_ATTACK)
{
// Call "fake" primary attack (Whatever_PrimaryAttack)
ExecuteForward(ForwardPrimaryAttack, _, this);
}
}
public Whatever_PrimaryAttack(this)
{
// Do primary attack
}
But, many lines would have to be made and probably would be required orpheu or reapi to work with ApplyMultiDamage, AddMultiDamage, FireBullets3, etc. It's a idea to think about, since the only method that developers know and have nowadays it's "override" weapons. I'm not sure what're the good and bad points of my idea. If anyone wants to comment, feel free.
__________________