View Single Post
Author Message
G[o]Q
Member
Join Date: Jan 2010
Location: Poland (Malopolska)
Old 08-31-2010 , 09:34   Orpheu: problem with slot change
Reply With Quote #1

Hi
I found script by Arkshire but when i compile and enable this plugin
i have error in logs

Code:
L 08/31/2010 - 15:14:45: [ORPHEU] Class doesn't have it's virtual table pointer set
L 08/31/2010 - 15:14:45: [AMXX] Displaying debug trace (plugin "awp_slot.amxx")
L 08/31/2010 - 15:14:45: [AMXX] Run time error 10: native error (native "OrpheuGetFunctionFromClass")
L 08/31/2010 - 15:14:45: [AMXX]    [0] awp_slot.sma::plugin_precache (line 16)
my code
Code:
#include <amxmodx>
#include <orpheu>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    
}
public plugin_precache(){
    new OrpheuFunction:hook = OrpheuGetFunctionFromClass( "weapon_awp", "GetItemInfo", "CBasePlayerItem" )
    OrpheuRegisterHook( hook, "OnGetItemInfoAWP", OrpheuHookPost );
} 
public OnGetItemInfoAWP( const item, const itemInfo) {
    OrpheuSetParamStructMember( 2, "iSlot", 5 ); 
}
my signature
Code:
{
     "name"      : "GetItemInfo",
     "class"     : "CBasePlayerItem",
     "library"   : "mod",
     "arguments" :
     [
         {
             "type" : "ItemInfo *"
         }
     ],
     "return" :     {
         "type" : "int"
     },
     "indexes" :
     [
         {
             "os"    : "windows",
             "mod"   : "cstrike",
             "value" : 61
         },         {
             "os"    : "linux",
             "mod"   : "cstrike",
             "value" : 63
         }
     ] 
}
can you say me what is wrong

//sorry 4 my English
G[o]Q is offline