Raised This Month: $ Target: $400
 0% 

[Orpheu] Problem with SecondarAttack.


Post New Thread Reply   
 
Thread Tools Display Modes
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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-24-2010 , 07:13   Re: [Orpheu] Problem with SecondarAttack.
Reply With Quote #2

If you want a zoom on another weapon, see this plugin : http://forums.alliedmods.net/showthread.php?t=124972
__________________
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-24-2010 , 08:30   Re: [Orpheu] Problem with SecondarAttack.
Reply With Quote #3

SecondaryAttack doesn't exist on weapon_ak47, where have you found it ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



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