Raised This Month: $ Target: $400
 0% 

[Orpheu] Problem with CBasePlayerWeapon::DefaultDeploy


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Owner123
Member
Join Date: Jun 2010
Old 04-25-2011 , 14:37   [Orpheu] Problem with CBasePlayerWeapon::DefaultDeploy
Reply With Quote #1

Hi. I have strange problem. I have plugin to hook this function but when I only hook this function, I cant change weapon.
My code:
PHP Code:
#include <amxmodx>
#include <orpheu>

public plugin_init()
{
    
register_plugin("Orpheu Test""1.0.0""Owner")
    
    
OrpheuRegisterHook(OrpheuGetFunction("DefaultDeploy""CBasePlayerWeapon"), "on_DefaultDeploy"OrpheuHookPost);
}

public 
OrpheuHookReturn:on_DefaultDeploy(enttext1[], text2[], int1text3[], int2)
{
    
client_print(0print_chat"ent=%i %s %s %i %s %i"enttext1text2int1text3int2);
    
    return 
OrpheuIgnored;

And sig:
Code:
{
    "name"      : "DefaultDeploy",
    "class"     : "CBasePlayerWeapon",
    "library"   : "mod",
    "arguments" :
    [
        {
            "type" : "char *"
        },
        {
            "type" : "char *"
        },
        {
            "type" : "int"
        },
        {
            "type" : "char *"
        },
        {
            "type" : "int"
        }
    ],
    "identifiers" :
    [
        {
            "os"    : "windows",
            "mod"   : "cstrike",
            "value" : 0
        },
        {
            "os"    : "linux",
            "mod"   : "cstrike",
            "value" : "DefaultDeploy__17CBasePlayerWeaponPcT1iT1i"
        }
    ]
}
I dont want offset for Windows.
__________________
Sorry for my bad english !
Owner123 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-25-2011 , 15:39   Re: [Orpheu] Problem with CBasePlayerWeapon::DefaultDeploy
Reply With Quote #2

My file :

PHP Code:
{
    
"name"      "DefaultDeploy",
    
"class"     "CBasePlayerWeapon",
    
"library"   "mod",
    
"arguments" 
    [
        {
            
"type" "char *" 
        
},
        {
            
"type" "char *" 
        
},
        {
            
"type" "int" 
        
},
        {
            
"type" "char *" 
        
},
        {
            
"type" "int" 
        
}
    ],
    
"return" :
    {
        
"type" "bool"
    
},
    
"identifiers" 
    [
        {
            
"os"    "windows",
            
"mod"   "cstrike",
            
"value" : [0x53,0x8B,0xD9,0x8B,0x03,0xFF,0x90,"*","*","*","*",0x85,0xC0,0x75,"*",0x5B,0xC2,"*","*",0x8B,0x8B,"*","*","*","*",0x56,0x57,0xE8]
        },
        {
            
"os"    "linux",
            
"mod"   "cstrike",
            
"value" "DefaultDeploy__17CBasePlayerWeaponPcT1iT1i"
        

    ]

You forget the return.
__________________
Arkshine is offline
Owner123
Member
Join Date: Jun 2010
Old 04-26-2011 , 04:38   Re: [Orpheu] Problem with CBasePlayerWeapon::DefaultDeploy
Reply With Quote #3

Thanks ! Now work properly.
__________________
Sorry for my bad english !
Owner123 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 20:13.


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