Raised This Month: $ Target: $400
 0% 

[HELP] Problem with Putting Recoil on Glock


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hellmonja
Senior Member
Join Date: Oct 2015
Old 07-03-2017 , 23:25   [HELP] Problem with Putting Recoil on Glock
Reply With Quote #1

I thought putting some recoil (camera shake) on the Glock was simple enough. And it actually works. But when I switch to burst mode I get bullet holes directly above me. Not sure why it's doing that. =/

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

new cvar_glock_recoil;
new const 
glock_model[]  = "models/v_glock18.mdl";

public 
plugin_init()
{
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_glock18""Fw_Weapon_PrimaryAttack_Post"1);
    
cvar_glock_recoil register_cvar("glock_recoil""1.1");
}

public 
Fw_Weapon_PrimaryAttack_Post(weapon)
{
    static 
idmodel[32];
    
id pev(weaponpev_owner);
    
pev(idpev_viewmodel2model31);
    
    if(!
equali(modelglock_model))
        return 
HAM_IGNORED
    
    
if(!cs_get_weapon_ammo(weapon))
        return 
HAM_IGNORED
    
    set_pev
(idpev_punchangleget_pcvar_float(cvar_glock_recoil));
    
    return 
HAM_IGNORED

__________________
hellmonja is offline
 



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 23:09.


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