rn
rnThis one turns a weapon ID into a weapon Name. The one that comes with AMXX core doesn't do it properly.
rn
rn
stock dod_get_weaponname( wpnID, szWpnName[32] ) {rn xmod_get_wpnlogname( wpnID, szWpnName, 31 );rn format( szWpnName, 31, "weapon_%s", szWpnName );rn}rn
rnThis one gets the users weapon entity number, based on the weapon the client is currently holding. It incorporates the above stock into it.
rn
rn
stock detect_weapon_id( id ) {rn new m_iCurEnt = -1, m_iWpnEnt = 0, m_szWpn[32];rn rn // Get User Weapon and WpnNamern new clip, ammo, m_iWpn = get_user_weapon(id,clip,ammo);rn xmod_get_wpnlogname( m_iWpn, m_szWpn, 31 ); // Requires DoDX Modulern format( m_szWpn, 31, "weapon_%s", m_szWpn );rnrn // Get User Originrn new Float:m_flOrigin[3];rn pev( id, pev_origin, m_flOrigin );rn rn // Find Dummy Weaponrn while( ( m_iCurEnt = engfunc( EngFunc_FindEntityInSphere, m_iCurEnt, m_flOrigin, Float:1.0 ) ) != 0 ) {rn new m_szClassname[32];rn pev( m_iCurEnt, pev_classname, m_szClassname, 31 );rn rn if( equal( m_szClassname, m_szWpn ) )rn m_iWpnEnt = m_iCurEnt;rn }rn return m_iWpnEnt;rn}rn
rnThis one tests whether a player has his bazooka shouldered. Requires Fakemeta module and the detect_weapon_id stock.
rn
rn
// Returns 1 if rocket is shoulderedrn#if defined _fakemeta_includedrnstock dod_is_shouldered( id ) {rn return get_pdata_int( detect_weapon_id(id), 115, 4 );rn}rn#end ifrn
rnSet User Pronestate. Requires either FM or Engine.
rn
stock dod_set_pronestate( id, flag ) {rn#if defined _fakemeta_includedrn set_pev( id, pev_iuser3, flag );rn#elseif defined _engine_includedrn entity_set_int( id, EV_INT_iuser3, flag );rn#endifrn}rn
rn
rnAttached Below
rnConst file for Model Sequences in DoD by Wilson

