Raised This Month: $ Target: $400
 0% 

[REQ] No scope, no shoot


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-02-2017 , 08:34   Re: [REQ] No scope, no shoot
Reply With Quote #8

Doesn't work as well. Here:

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>

#define m_pPlayer 41
#define m_flNextPrimaryAttack 46
#define XO_WEAPON 4

new const g_szWeapons[][] = { "weapon_awp""weapon_scout""weapon_g3sg1""weapon_sg550" }

public 
plugin_init()
{
    
register_plugin("No Shoot Unless Scoped""1.0""OciXCrom @ alliedmods.net")
    
    for(new 
isizeof(g_szWeapons); i++)
        
RegisterHam(Ham_Weapon_PrimaryAttackg_szWeapons[i], "OnShootPre")
}

public 
OnShootPre(iEnt)
{
    static 
id
    id 
get_pdata_cbase(iEntm_pPlayerXO_WEAPON)
    
    if(
cs_get_user_zoom(id) < CS_SET_FIRST_ZOOM)
    {
        
set_pdata_float(iEntm_flNextPrimaryAttack1.0XO_WEAPON)
        return 
HAM_SUPERCEDE
    
}
    
    return 
HAM_IGNORED

__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
 



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 02:01.


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