Raised This Month: $ Target: $400
 0% 

[Orpheu] Retrieving player's IP address


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-11-2022 , 11:40   Re: [Orpheu] Retrieving player's IP address
Reply With Quote #2

Try this signature for NET_AdrToString:

Code:
{
    "name" : "NET_AdrToString",
    "library" : "engine",
     "arguments" :
    [
        {
            "type" : "pointer"
        }
    ],
    "return" :
    {
        "type" : "char *"
    },
    "identifiers" :
    [
        {
            "os" : "windows",
            "value" :[0x55,0x8B,"*",0x6A,"*",0x6A,"*",0x68,"*","*","*","*",0xE8,"*","*","*","*",0x8B,"*","*",0x83,"*","*",0x83,"*","*",0x75,"*",0x68,"*","*","*","*",0x6A,"*",0x68,"*","*","*","*",0xE8,"*","*","*","*",0x83,"*","*",0xB8,"*","*","*","*",0x5D,0xC3,0x83,"*","*",0x75,"*",0x8B,"*","*",0x50,0xE8,"*","*","*","*",0x8B,"*","*",0x8B,"*","*",0x25]
        },
        {
            "os" : "linux",
            "value" : "NET_AdrToString"
        }
    ]
}
Note that the signature file is not entirely correct, but it appears to be working. The issue is with the first argument: const netadr_t& a. Orpheu doesn't have support for netadr_t structure as far as I know, so you don't have a corresponding type. I declared it as pointer and it appears to be fine, but please know this isn't a pointer(if it was, things would be so much easier) so do not try to read data from it.
__________________
HamletEagle 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 11:38.


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