Raised This Month: $ Target: $400
 0% 

Orpheu: Changing weapon slot.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Owner123
Member
Join Date: Jun 2010
Old 06-23-2010 , 12:25   Orpheu: Changing weapon slot.
Reply With Quote #1

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:
PHP 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):
Code:
{
    "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
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 14:50.


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