Owner123
06-23-2010, 12:25
Hi all.
I want to change awp slot from 1 to 6.
I try with normal function and with virtual function.
I use this code:
#include <amxmodx>
#include <orpheu>
public plugin_init()
{
register_plugin("New Plugin", "1.0", "Owner")
new OrpheuFunction:HookAwpSlot = OrpheuGetFunction("iItemSlot", "CAWP") // i use this
//new OrpheuFunction:HookAwpSlot = OrpheuGetFunctionFromClass("weapon_awp", "iItemSlot", "CAWP") // or this
OrpheuRegisterHook(HookAwpSlot, "OnAwpSlot")
}
public OnAwpSlot(weapon_awp)
OrpheuSetReturn(6)
And with this(now as virtual function but i change this to normal function):
{
"name" : "iItemSlot",
"class" : "CAWP",
"library" : "mod",
"return" :
{
"type" : "int"
},
"indexes" :
[
{
"os" : "windows",
"mod" : "cstrike",
"value" : 79
},
{
"os" : "linux",
"mod" : "cstrike",
"value" : 81
}
]
}
But it still dont work :s
I want to change awp slot from 1 to 6.
I try with normal function and with virtual function.
I use this code:
#include <amxmodx>
#include <orpheu>
public plugin_init()
{
register_plugin("New Plugin", "1.0", "Owner")
new OrpheuFunction:HookAwpSlot = OrpheuGetFunction("iItemSlot", "CAWP") // i use this
//new OrpheuFunction:HookAwpSlot = OrpheuGetFunctionFromClass("weapon_awp", "iItemSlot", "CAWP") // or this
OrpheuRegisterHook(HookAwpSlot, "OnAwpSlot")
}
public OnAwpSlot(weapon_awp)
OrpheuSetReturn(6)
And with this(now as virtual function but i change this to normal function):
{
"name" : "iItemSlot",
"class" : "CAWP",
"library" : "mod",
"return" :
{
"type" : "int"
},
"indexes" :
[
{
"os" : "windows",
"mod" : "cstrike",
"value" : 79
},
{
"os" : "linux",
"mod" : "cstrike",
"value" : 81
}
]
}
But it still dont work :s