Yes... how would one go on about that?
For Team Fortress, Day of Defeat, Natural Selection, of course for Counter-Strike, and even for the uncommon mod The Specialists there are appropriate modules which provide the functions. But Half-Life, which is the incarnation of standard and default seems to have no support for this at all.
If I am just blind please direct me to the right direction.
Untill then...
Code:
static wpnid;
static clip;
static ammo;
wpnid = get_user_weapon(id, clip, ammo);
static weapname[33];
get_weaponname(wpnid , weapname , 32);
static wpn;
wpn = -1;
while((wpn = engfunc(EngFunc_FindEntityByString, wpn, "classname", weapname)) != 0) {
if(id == pev(wpn, pev_owner)) {
// Insert magic here
break;
}
}
__________________