Quote:
Originally Posted by Arkshine
Yes.
About the plugin, you hook as pre, so, when you will shoot while zooming you will add some spread ( see the start of function ). So, you should hook as post. Now, about the offset, there is not really a difference. Just, I prefer to trigger something and letting the game doing its job rather than forcing when no need. Here you have an offset m_bResumeZoom which is meant specifically for what you need. The game will check that at the right time to remove the zoom, so just turn off the offset.
|
Now I understand what you're saying but I don't really know how to use that offset....
Are you talking about
: set_pdata_int(_index,_Offset,_Value,_linuxdif f=5); ?
And if so... I don't really have a clue about how to use it...
Like: set_pdata_int(iEnt
,185,0,_) ?
Edit: where can I find the offset number for m_bResumeZoom ? I can't find it anywhere...
Ok, so I think it should be something like this ?
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define PLUGIN "UnZoom"
#define VERSION "0.1"
#define AUTHOR "Connor/Arkshine/Exolent/80T"
new Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame
#define m_pPlayer 41
#define m_iFOV 363
#define m_bResumeZoom 110
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_awp", "Sniper_UnScope")
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_scout", "Sniper_UnScope")
}
public Sniper_UnScope( iEnt )
{
new id = get_pdata_cbase(iEnt, m_pPlayer, 4)
if( get_pdata_int(id, m_iFOV, 5) < 90 )
{
set_pdata_int(iEnt, m_bResumeZoom, 0, 5)
ExecuteHamB( Ham_Player_ResetMaxSpeed, id );
}
}
But it's not working...
__________________