Help Help! Marker Color samp

SamThapa

Active member
Joined
Jan 22, 2018
Messages
89
Reaction score
2
hey there i need help here i try to get samp marker color id to RGB (normally we get marker color id 0 is red but in samp its not red) but its too hard i try almost all tricks no luck yet Marker ID to RGB thanks
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,747
Solutions
2
Reaction score
123
Are you using the blip struct? I used it before and it does give the color ID in RGBA of each marker. Not sure which marker you mean though do you mean target marker or like standard player markers?
 

SamThapa

Active member
Joined
Jan 22, 2018
Messages
89
Reaction score
2
i mean those marker in players its in radar you know 1764314236535.png i am using this
MAX_MARKERS = 175
MARKER_SIZE = 0x28
BASE_ADDRES = 0xBA86F0 i get all ids from 0 to 1004 but i need return colors in hex or rgb both ok for me
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,747
Solutions
2
Reaction score
123
Code:
FOR 0@ = 0xBA86F0 to 0xBAA248 step 40
    0C0C: 1@ = struct 0@ offset 0 size 4 // RGBA
END
Not tested but that loop will give all the RGBAs of every marker. Just picked it out of one of my codes, I can give full example if that helps.
 

SamThapa

Active member
Joined
Jan 22, 2018
Messages
89
Reaction score
2
its not rgba it gives color ids :O and i already have found i see never or none done before i get return argb and not using any previous methoud they used like this
:Colors
if or
0@ == 0
0@ == 1
0@ == 2
0@ == 4
0@ == 7
0@ == 8
then if and
0@ == 7
1@ == 0
jf @3D_M
Goto @cred

:3D_M
if 2@ > 0
jf @3D_Ms
if 08B7: test 2@ bit 0
jf @cred
Goto @cblue

:3D_Ms
0871: 0@ total_jumps 6 default_jump 0 @cwhite jumps 0 @cred 1 @cgreen 2 @clblue 4 @cyellow 7 @cblue 8 @cyellow -1 @cwhite

:cred
call @GetColorID_RGB 1 colorID 0 RGB 3@ 4@ 5@
Goto @Outs

:cgreen
call @GetColorID_RGB 1 colorID 1 RGB 3@ 4@ 5@
Goto @Outs

:clblue
call @GetColorID_RGB 1 colorID 3 RGB 3@ 4@ 5@
Goto @Outs

:cwhite
call @GetColorID_RGB 1 colorID 4 RGB 3@ 4@ 5@
Goto @Outs

:cyellow
call @GetColorID_RGB 1 colorID 11 RGB 3@ 4@ 5@
Goto @Outs

:cblue
call @GetColorID_RGB 1 colorID 13 RGB 3@ 4@ 5@
Goto @Outs

else call @hex_to_r_g_b_a 1 color 0@ RGBA 3@ 4@ 5@ 6@
end

:Outs
ret 3 3@ 4@ 5@ and this
//call @getColorID_RGB 1 colorID 0 RGB_store_to 21@ 22@ 23@
:getColorID_RGB
0A90: 1@ = 0@ * 4 // int
000A: 1@ += 0xBAB22C
0A8D: 2@ = 1@ size 1 vp 0 // R
000A: 1@ += 1
0A8D: 3@ = 1@ size 1 vp 0 // G
000A: 1@ += 1
0A8D: 4@ = 1@ size 1 vp 0 // B
ret 3 2@ 3@ 4@ its all wrong i found exact what i need but thanks for help :)
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,747
Solutions
2
Reaction score
123
its not rgba it gives color ids :O and i already have found i see never or none done before i get return argb and not using any previous methoud they used like this
:Colors
if or
0@ == 0
0@ == 1
0@ == 2
0@ == 4
0@ == 7
0@ == 8
then if and
0@ == 7
1@ == 0
jf @3D_M
Goto @cred

:3D_M
if 2@ > 0
jf @3D_Ms
if 08B7: test 2@ bit 0
jf @cred
Goto @cblue

:3D_Ms
0871: 0@ total_jumps 6 default_jump 0 @cwhite jumps 0 @cred 1 @cgreen 2 @clblue 4 @cyellow 7 @cblue 8 @cyellow -1 @cwhite

:cred
call @GetColorID_RGB 1 colorID 0 RGB 3@ 4@ 5@
Goto @Outs

:cgreen
call @GetColorID_RGB 1 colorID 1 RGB 3@ 4@ 5@
Goto @Outs

:clblue
call @GetColorID_RGB 1 colorID 3 RGB 3@ 4@ 5@
Goto @Outs

:cwhite
call @GetColorID_RGB 1 colorID 4 RGB 3@ 4@ 5@
Goto @Outs

:cyellow
call @GetColorID_RGB 1 colorID 11 RGB 3@ 4@ 5@
Goto @Outs

:cblue
call @GetColorID_RGB 1 colorID 13 RGB 3@ 4@ 5@
Goto @Outs

else call @hex_to_r_g_b_a 1 color 0@ RGBA 3@ 4@ 5@ 6@
end

:Outs
ret 3 3@ 4@ 5@ and this
//call @getColorID_RGB 1 colorID 0 RGB_store_to 21@ 22@ 23@
:getColorID_RGB
0A90: 1@ = 0@ * 4 // int
000A: 1@ += 0xBAB22C
0A8D: 2@ = 1@ size 1 vp 0 // R
000A: 1@ += 1
0A8D: 3@ = 1@ size 1 vp 0 // G
000A: 1@ += 1
0A8D: 4@ = 1@ size 1 vp 0 // B
ret 3 2@ 3@ 4@ its all wrong i found exact what i need but thanks for help :)
It can be either RGBA or ID. If you're only getting IDs 0-8 that's just the server you're on, try different servers and you should see.
 
Top