Raised This Month: $ Target: $400
 0% 

[Orpheu] Problem with SecondarAttack.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Owner123
Member
Join Date: Jun 2010
Old 08-24-2010 , 07:03   [Orpheu] Problem with SecondarAttack.
Reply With Quote #1

Hi.
I want to make for AK-47 Zoom like Aug/Awp. I hook CBasePlayerWeapon::SecondaryAttack with this sig:
Code:
{
    "name"      : "SecondaryAttack",
    "class"     : "CBasePlayerWeapon",
    "library"   : "mod",
    "indexes" :
    [
        {
            "os"    : "windows",
            "mod"   : "cstrike",
            "value" : 88
        },
        {
            "os"    : "linux",
            "mod"   : "cstrike",
            "value" : 90
        }
    ]
}
Sig is ok, but when i turn on my plugin, server crash after start ...
My code:
PHP Code:
#include <amxmodx>
#include <orpheu>

new const gszVersion[] = "1.0.0";

new 
OrpheuFunction:gcAwp;
new 
OrpheuFunction:gcAug;
new 
OrpheuFunction:gcAk47;

public 
plugin_precache()
{
    
gcAk47 OrpheuGetFunctionFromClass("weapon_ak47""SecondaryAttack""CBasePlayerWeapon");
    
gcAug OrpheuGetFunctionFromClass("weapon_aug""SecondaryAttack""CBasePlayerWeapon");
    
gcAwp OrpheuGetFunctionFromClass("weapon_awp""SecondaryAttack""CBasePlayerWeapon");
}

public 
plugin_init()
{
    
register_plugin("Weapon Zoom Changer"gszVersion"Owner");
    
OrpheuRegisterHook(gcAk47"OrpheuSecondaryAttackPre");
}

public 
OrpheuHookReturn:OrpheuSecondaryAttackPre(weapon_ent)
{
    
OrpheuCall(gcAugweapon_ent);
    
    return 
OrpheuSupercede;

Help!
__________________
Sorry for my bad english !
Owner123 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 21:59.


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