View Single Post
Author Message
Silencer123
Veteran Member
Join Date: Jul 2006
Old 06-06-2009 , 21:41   Changing clip and backpack ammo in Half-Life
Reply With Quote #1

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;         }     }
__________________
EAT YOUR VEGGIES
Silencer123 is offline