CLEO Help Detect Players with No Radar Marker

CLEO related

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
I am trying to detect all players who does not Have a Radar Blimp/Marker(AKA 2D Radar Invisible), I have tried using these pointers:
Code:
    int                        iGlobalMarkerLoaded; // ->stRemotePlayerData + 489
    int                        iGlobalMarkerLocation[3]; // ->stRemotePlayerData + 493
    uint32_t                ulGlobalMarker_GTAID; // ->stRemotePlayerData + 505

But it seems like these Pointers returns unpredictable values(or maybe Im using wrong Pointers). Anybody know a Fix about this problem? Im using SAMP 0.3.7 R1 Pointers.
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
297
Reaction score
103
Location
UGBASE
Global Markers are only being streamed / sent by server if they are enable ShowMarkers ID 1 (Global). Else I think you won't receive precise data about those information. I could be wrong.
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Source:
https://ugbase.eu/threads/c-external-multicheat-pasted-shit-exe-source-code.22176/

Mark gray hiden players in radar
C++:
            BYTE bytes;
            DWORD offset;
            ReadProcessMemory(hProcess, (LPVOID)(moduleBase + 0x1036), &bytes, sizeof(bytes), 0);
// moduleBase = samp.dll address
            if (bytes == 120)
            {
                offset = 0x18F6C0;
            }
            else if (bytes == 168)
            {
                offset = 0x216378;
            }
            else if (bytes == 216)
            {
                offset = 0x216380;
            }
            for (int index = 0; index < 1000; ++index)
            {
                DWORD value;
                ReadProcessMemory(hProcess, (LPVOID)(moduleBase + offset + 4 * index), &value, sizeof(value), 0);
                if (checkBox5->Checked)
                {
                    if (GetAsyncKeyState(VK_F2))
                    {
                        if (value == 0x55555500)
                        {
                            DWORD newvalue = 0x555555FF;
                            WriteProcessMemory(hProcess, (LPVOID)(moduleBase + offset + 4 * index), , &newvalue, sizeof(newvalue), 0);
                                                }
                                          if (GetAsyncKeyState(VK_F3))
                    {
                        if (value == 0x555555FF)
                        {
                            DWORD newvalue = 0x55555500;
                            WriteProcessMemory(hProcess, (LPVOID)(moduleBase + offset + 4 * index), &newvalue, sizeof(newvalue), 0);
                        }
                    }
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Global Markers are only being streamed / sent by server if they are enable ShowMarkers ID 1 (Global). Else I think you won't receive precise data about those information. I could be wrong.
I checked this, and I confirmed that Markers Mode is set to 1(GLOBAL)
stSAMP->stServerPresets->iPlayerMarkersMode=1
But these still dont work:
Code:
    int                        iGlobalMarkerLoaded; // ->stRemotePlayerData + 489
    int                        iGlobalMarkerLocation[3]; // ->stRemotePlayerData + 493
    uint32_t                ulGlobalMarker_GTAID; // ->stRemotePlayerData + 505
Am I missing Something?

Source:
https://ugbase.eu/threads/c-external-multicheat-pasted-shit-exe-source-code.22176/

Mark gray hiden players in radar
C++:
            BYTE bytes;
            DWORD offset;
            ReadProcessMemory(hProcess, (LPVOID)(moduleBase + 0x1036), &bytes, sizeof(bytes), 0);
// moduleBase = samp.dll address
            if (bytes == 120)
            {
                offset = 0x18F6C0;
            }
            else if (bytes == 168)
            {
                offset = 0x216378;
            }
            else if (bytes == 216)
            {
                offset = 0x216380;
            }
            for (int index = 0; index < 1000; ++index)
            {
                DWORD value;
                ReadProcessMemory(hProcess, (LPVOID)(moduleBase + offset + 4 * index), &value, sizeof(value), 0);
                if (checkBox5->Checked)
                {
                    if (GetAsyncKeyState(VK_F2))
                    {
                        if (value == 0x55555500)
                        {
                            DWORD newvalue = 0x555555FF;
                            WriteProcessMemory(hProcess, (LPVOID)(moduleBase + offset + 4 * index), , &newvalue, sizeof(newvalue), 0);
                                                }
                                          if (GetAsyncKeyState(VK_F3))
                    {
                        if (value == 0x555555FF)
                        {
                            DWORD newvalue = 0x55555500;
                            WriteProcessMemory(hProcess, (LPVOID)(moduleBase + offset + 4 * index), &newvalue, sizeof(newvalue), 0);
                        }
                    }

That Code Entry only changes the Player Color, there is no entry out there that tells whether the player is MASKED or NOT. Anyway, I converted his code into cleo:
Code:
{$CLEO}
0000:

WHILE TRUE
    wait 0
    if 0AA2: 0@ = load_dynamic_library "samp.dll"
    then
        0A8E: 1@ = 0@ + 0x1036
        0A8D: 1@ = read_memory 1@ size 1 virtual_protect 0
        if 1@ == 120
        then 0@ += 0x18F6C0 // SAMP_COLOR_OFFSET for other version?
        else
            if 1@ == 168
            then 0@ += 0x216378 // SAMP_COLOR_OFFSET R1? According to Blast.hk Sobeit R1 Source, but I think this is wrong
            else
                if 1@ == 216
                then 0@ += 0x216380 // SAMP_COLOR_OFFSET R1, I always get this value on My SAMP R1
                else continue
                end
            end
        end
        for 1@ = 0 to 999
            0A8D: 2@ = read_memory 0@ size 4 virtual_protect 0
            0AD1: show_formatted_text_highpriority "%d=%d" time 2000 1@ 2@
            if 2@ == 0x55555500
            then 0A8C: write_memory 0@ size 4 value 0x555555FF virtual_protect 0
            else
                if 2@ == 0x555555FF
                then 0A8C: write_memory 0@ size 4 value 0x55555500 virtual_protect 0
                end
            end
            0@ += 4
        end
    end
END

And as expected, it doesn't work because it only checks player color, not the radar marker. I also check the discord.exe sourcecode that he attached, but I can't seem to find where on his code detects masked players.
 
Last edited:

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
297
Reaction score
103
Location
UGBASE
Check for the struct of stRemotePlayerData -> int iShowNameTag;

That's what you are looking for and accomplish your isMasked check.
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Check for the struct of stRemotePlayerData -> int iShowNameTag;

That's what you are looking for and accomplish your isMasked check.

I Use the Memory Pointer iShowNameTag=1 on My NameTag Wallhack Script to Force a certain player who have Masked NameTag to Appear, since there are servers that hides player NameTags.

But Radar Blip/Markers seems to be a different case from NameTags.

There is a certain server that both Masks Player NameTag and Radar Blip, I Can force the NameTag to Show by patching iShowNameTag=1, but I Don't know how to Force the Player's Radar Blip to show.
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
297
Reaction score
103
Location
UGBASE
Hmm im not sure about the radar-blip because I never worked with their memory. But alternatively you could just check out my Player-Finder CLEO (open-sourced no encryption). There is a opcode that creates a blue-arrow above the players char pointing on him and creates an blip on the radar. You could use that function to loop through those masked players (each second maybe based on distance...? if distance > 1000.0m update each 10 secs or some shit and if < 1000.0m 1 sec) and draw their blips manually. Good luck with that.
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Hmm im not sure about the radar-blip because I never worked with their memory. But alternatively you could just check out my Player-Finder CLEO (open-sourced no encryption). There is a opcode that creates a blue-arrow above the players char pointing on him and creates an blip on the radar. You could use that function to loop through those masked players (each second maybe based on distance...? if distance > 1000.0m update each 10 secs or some shit and if < 1000.0m 1 sec) and draw their blips manually. Good luck with that.
I guess I'll do that alternatively.

I kinda remember a certain MOD here at UGBase where all Default Radar Markers are Disabled(patches iPlayerMarkersMode=0) and is replaced by a custom Rendered Blip on all player Positions(so that the MOD will not worry about radar invisible player). But I forgot the link of this MOD, and Now I can't Find it. Does anybody know the Link of this MOD? I would like to reexamine the creation of the MOD. I remember @monday commented this thread.
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
Hi, is the purpose to detect all players online within the same virtual world?
If that's the case, then unfortunately servers do not send location data for players outside of "streamed" zone (when radar markers are disabled).
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Hi, is the purpose to detect all players online within the same virtual world?
If that's the case, then unfortunately servers do not send location data for players outside of "streamed" zone (when radar markers are disabled).

Hypothetically if they are streamed, is there a way identify if the player have a Radar blip? I really would like to know how.


Regarding to Streamed Out Players, In the Case of the Server I Played, it sets iPlayerMarkersMode by default into 1(Global) which I can see some players have radar blips even if they are out of stream. So I can retrieve their location data using stStreamedOutPlayerInfo . The problem is about the Marker Blips, I Can't tell if A player has a radar marker on my map. Some streamed out players have radar blips, and some have none. Do you know any memory pointer where this SAMP radar blips are stored?
 

Trou

Member
Joined
Sep 3, 2018
Messages
22
Reaction score
5
Hypothetically if they are streamed, is there a way identify if the player have a Radar blip? I really would like to know how.


Regarding to Streamed Out Players, In the Case of the Server I Played, it sets iPlayerMarkersMode by default into 1(Global) which I can see some players have radar blips even if they are out of stream. So I can retrieve their location data using stStreamedOutPlayerInfo . The problem is about the Marker Blips, I Can't tell if A player has a radar marker on my map. Some streamed out players have radar blips, and some have none. Do you know any memory pointer where this SAMP radar blips are stored?
Year Ago I Make Smilar Mod Like In Your Question, In The This Cheat https://www.blast.hk/threads/56711/
Fast Map Its Shows Player Icons/Markers, If Player Is Streamed Its Reads Onfoot/Vehicle Data Etc But If Not Its Reads GlobalMarkerPos.

The problem is about the Marker Blips, I Can't tell if A player has a radar marker on my map. Some streamed out players have radar blips, and some have none. Do you know any memory pointer where this SAMP radar blips are stored
Players In Some Range(distance was within city range when I tested it but im not sure about this) Sends Global Marker Data To You

int iGlobalMarkerLoaded; // ->stRemotePlayerData
uint32_t ulGlobalMarker_GTAID; // ->stRemotePlayerData

Use These Adress To Check Player Has Global Marker Or Not, Should Work If Not Sometings Wrong In Your Script
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Players In Some Range(distance was within city range when I tested it but im not sure about this) Sends Global Marker Data To You



Use These Adress To Check Player Has Global Marker Or Not, Should Work If Not Sometings Wrong In Your Script

Thanks for the Tip, Are these Memory Pointers Right for R1?
Code:
int iGlobalMarkerLoaded; // ->stRemotePlayerData + 489
int iGlobalMarkerLocation[3]; // ->stRemotePlayerData + 493
uint32_t ulGlobalMarker_GTAID; // ->stRemotePlayerData + 505
 
Top