AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Orpheu signture EntSelectSpawnPoint() (https://forums.alliedmods.net/showthread.php?t=281863)

11922911 04-22-2016 22:03

Orpheu signture EntSelectSpawnPoint()
 
I tried this
Code:

{
        "name" : "EntSelectSpawnPoint",
        "library" : "mod",
        "arguments" :
        {
                "type" : "CBaseEntity *"
        },
        "return" :
        {
                "type" : "edict_s *"
        },
        "identifiers" :
        [
                {
                        "os"    : "windows",
                        "mod"  : "cstrike",
                        "value" : [0x53,0x8B,"*","*","*",0x55,0x56,0x8B,"*","*",0x57,0x8B,"*","*","*","*","*",0x89]
                },
                {
                        "os"    : "linux",
                        "mod"  : "cstrike",
                        "value" : "find later"
                }
        ]
}

PHP Code:

#include <amxmodx>
#include <orpheu>

public plugin_init()
{
    
OrpheuRegisterHook(OrpheuGetFunction("EntSelectSpawnPoint"), "OnEntSelectSpawnPoint_Post"OrpheuHookPost);
}

public 
OnEntSelectSpawnPoint_Post(id)
{
    
server_print("EntSelectSpawnPoint(%d) -> return %d;"idOrpheuGetReturn());
    
client_print(0print_chat"EntSelectSpawnPoint(%d) -> return %d;"idOrpheuGetReturn());


But it doesn't seems to work, function not found.

11922911 04-22-2016 23:36

Re: Orpheu signture EntSelectSpawnPoint()
 
Another question, can OrpheuCall() return value for the function? Thanks.

HamletEagle 04-23-2016 04:27

Re: Orpheu signture EntSelectSpawnPoint()
 
Your file is wrong. Pay attention on the syntax(arguments part).

Code:

{
        "name" : "EntSelectSpawnPoint",
        "library" : "mod",
        "arguments" :
        [
                {
                        "type" : "CBaseEntity *"
                }
        ],
        "return" :
        {
                "type" : "edict_s *"
        },
        "identifiers" :
        [
                {
                        "os"    : "windows",
                        "mod"  : "cstrike",
                        "value" : [0x53,0x8B,"*","*","*",0x55,0x56,0x8B,"*","*",0x57,0x8B,"*","*","*","*","*",0x89]
                },
                {
                        "os"    : "linux",
                        "mod"  : "cstrike",
                        "value" : "_Z19EntSelectSpawnPointP11CBaseEntity"
                }
        ]
}

I don't understand your next question. You are asking what OrpheuCall returns?

11922911 04-23-2016 06:51

Re: Orpheu signture EntSelectSpawnPoint()
 
Quote:

Originally Posted by 11922911 (Post 2413370)
Another question, can OrpheuCall() return original value for from the function that called? Thanks.



All times are GMT -4. The time now is 18:42.

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