Thread: Unscope Snipers
View Single Post
Costin83
Senior Member
Join Date: Jul 2008
Location: Romania
Old 08-31-2010 , 20:17   Re: Unscope Snipers
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
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(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_awp""Sniper_UnScope")
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_scout""Sniper_UnScope")
}

public 
Sniper_UnScopeiEnt )
{
    new 
id get_pdata_cbase(iEntm_pPlayer4)

    if( 
get_pdata_int(idm_iFOV5) < 90 )
    {
        
set_pdata_int(iEntm_bResumeZoom05)
        
ExecuteHamBHam_Player_ResetMaxSpeedid );
    }

But it's not working...
__________________
Originally Posted by Hawk552
Actually, if your style pisses me off enough, I'll generally go through your code and find some reason to unapprove it or at least hold it back.

Last edited by Costin83; 09-01-2010 at 10:37.
Costin83 is offline
Send a message via Yahoo to Costin83