Raised This Month: $95 Target: $400
 23% 

Unscope Snipers


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   ConnorMcLeod (74)
Costin83
Senior Member
Join Date: Jul 2008
Location: Romania
Old 08-31-2010 , 18:24   Unscope Snipers
Reply With Quote #1

A simple plugin that unscopes AWP and SCOUT after shooting to exempt you from the effort to fast switch from your primary weapon to your pistol and vice versa avoiding ending up with a scoped weapon after shooting.

Credits: ConnorMcLeod Arkshine Exolent[jNr]

Updated - Please redownload (better version available)
Attached Files
File Type: sma Get Plugin or Get Source (unscope.sma - 1342 views - 833 Bytes)
__________________
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 15:41.
Costin83 is offline
Send a message via Yahoo to Costin83
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-31-2010 , 18:40   Re: Unscope Snipers
Reply With Quote #2

I've told you new id = blabla, directly... -_-
__________________
Arkshine is offline
Costin83
Senior Member
Join Date: Jul 2008
Location: Romania
Old 08-31-2010 , 18:51   Re: Unscope Snipers
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
I've told you new id = blabla, directly... -_-
I'm really dumb... Shoot me! (where I'm from, you could easily confuse "directly" with "Yes, that's exactly what I meant" so there was the confusion... )

Updated...
__________________
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; 08-31-2010 at 18:59.
Costin83 is offline
Send a message via Yahoo to Costin83
Old 08-31-2010, 19:20
Arkshine
This message has been deleted by Arkshine. Reason: nvm
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-31-2010 , 19:36   Re: Unscope Snipers
Reply With Quote #4

Actually, looking at the AWP weapon, I would prefer to use m_bResumeZoom set to 0 to no allow the zoom to back.
__________________
Arkshine is offline
Costin83
Senior Member
Join Date: Jul 2008
Location: Romania
Old 08-31-2010 , 19:56   Re: Unscope Snipers
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
Actually, looking at the AWP weapon, I would prefer to use m_bResumeZoom set to 0 to no allow the zoom to back.
Why !?!

BTW: Is that .cpp from your CS 1.6 SDK ?
__________________
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.
Costin83 is offline
Send a message via Yahoo to Costin83
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-31-2010 , 20:29   Re: Unscope Snipers
Reply With Quote #6

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.
__________________
Arkshine is offline
Costin83
Senior Member
Join Date: Jul 2008
Location: Romania
Old 08-31-2010 , 21: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 11:37.
Costin83 is offline
Send a message via Yahoo to Costin83
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-01-2010 , 00:41   Re: Unscope Snipers
Reply With Quote #8

Don't turn your plugin submission topic into a scripting help topic.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-01-2010 , 02:46   Re: Unscope Snipers
Reply With Quote #9

You doesn't seem to understand how thoe whole thing is working, take the time to understand and then update the plugin, also, hook primattack POST should be better.
__________________
- tired and retired -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-01-2010 , 10:25   Re: Unscope Snipers
Reply With Quote #10

Quote:
But it's not working...
Because it's a player's offset. I should have said it before.
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:22.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode