Jump to content

Gang Members Color on Radar


King Coldey

Recommended Posts

I'm pretty sure I've seen this question asked and answered a number of times. A proper search should be able to turn up more precise answers.

IIRC, there are two basic strategies. You can change the color code constant that's referenced when the color green is needed. I'm pretty sure that changing this value will change the green color on all game elements - hud and whatnot. Address for hud colors might be what you're after.

Another strategy would be to scan the blip pool for green blips and change their colors when found. The standard blip color codes will accept RGBA values in addition to the standard color IDs.

 

Link to comment
Share on other sites

King Coldey
10 minutes ago, OrionSR said:

I'm pretty sure I've seen this question asked and answered a number of times. A proper search should be able to turn up more precise answers.

IIRC, there are two basic strategies. You can change the color code constant that's referenced when the color green is needed. I'm pretty sure that changing this value will change the green color on all game elements - hud and whatnot. Address for hud colors might be what you're after.

Another strategy would be to scan the blip pool for green blips and change their colors when found. The standard blip color codes will accept RGBA values in addition to the standard color IDs.

 

Yea i was just thinking replacing color of ballas to grove,and grove to ballas , so green to purple and purple to green,just switch them,but can you help me out where can i find the codes so i could change it.

Im currently working on a good ballas mod,and this is actually last thing to do,changed turf colours and everything just those blips does not fit,in which file in gta sa directory are these color blips placed,so i could change them?

Edited by King Coldey
Link to comment
Share on other sites

Search site:gtaforums.com with a mix of the following keywords:
radar marker blip

struct address
gang hud colors

Link to comment
Share on other sites

King Coldey
8 hours ago, OrionSR said:

Search site:gtaforums.com with a mix of the following keywords:
radar marker blip

struct address
gang hud colors

Okay i’ll try,can we be in touch if i need more help?I find your script blipfix for broken saves,is that useful for this?

Edited by King Coldey
Link to comment
Share on other sites

BlipFix might help, is shows the process in action. But it's also a really weird script; I was trying to develop the same script for PC and Android so it's kind of hard to pick through the variations.

I found this reference to be particularly helpful.


Change the Blip: These types of references should be useful if you want to change each blip's color to something else.
Change the Color: If you want to change the default color for all blips of this type you'll need to keep searching.

Edited by OrionSR
Link to comment
Share on other sites

King Coldey
1 hour ago, OrionSR said:

BlipFix might help, is shows the process in action. But it's also a really weird script; I was trying to develop the same script for PC and Android so it's kind of hard to pick through the variations.

I found this reference to be particularly helpful.


Change the Blip: These types of references should be useful if you want to change each blip's color to something else.
Change the Color: If you want to change the default color for all blips of this type you'll need to keep searching.

Alright so i downloaded your blipfix file,can i put all these to modloader folder?or cleo?

Link to comment
Share on other sites

57 minutes ago, King Coldey said:

can i put all these to modloader folder?or cleo?

Neither. I don't know what modloader will think of this script. BlipFix doesn't really need to be installed unless you want to fix a save with too many blips added by bad cleo scripts. 

The idea would be to start with BlipFix.txt as model and try to adapt snippets to your code.
 

Link to comment
Share on other sites

King Coldey
On 10/11/2023 at 11:05 PM, OrionSR said:

Neither. I don't know what modloader will think of this script. BlipFix doesn't really need to be installed unless you want to fix a save with too many blips added by bad cleo scripts. 

The idea would be to start with BlipFix.txt as model and try to adapt snippets to your code.
 

Dang i never thought its going to be this hard xd,i have no clue how to do it..i mean i understand it but i never done scripting before..

Link to comment
Share on other sites

you still need it to change color existed marker in radar to any color you want? 

 

to do so you need first. marker handle so you can do what ever you want you cant put another marker to change it color if you want it badly ill give you script 

Link to comment
Share on other sites

This script should do the trick for you. Adjust the color settings to your preference, compile, and install the script with Sanny Builder. It'll change the blip color and map color of each gang, and can be adapted to Extended Gangwars for more gangs.

 

You may need to toggle an R2 mission, exit a gym, die or complete a gang war to get the map colors to update to the new color scheme.

 

{$CLEO .cs}
{$USE CLEO+}
//GangColors.txt
//WAIT 3000

CONST Byte=1, Word=2, Dword=4
CONST Ballas=0,Grove=1,Vagos=2,Rifa=3,DaNang=4,Mafia=5,Triad=6,Aztecas=7
CONST GangColorsRed = 0x8D1344, GangColorsGreen = 0x8D1350, GangColorsBlue = 0x8D135C

CONST Pink_R=242, Pink_G=35, Pink_B=214
WRITE_STRUCT_OFFSET GangColorsRed offset Ballas size Byte value Pink_R
WRITE_STRUCT_OFFSET GangColorsGreen offset Ballas size Byte value Pink_G
WRITE_STRUCT_OFFSET GangColorsBlue offset Ballas size Byte value Pink_B

CONST NewBlue_R=46, NewBlue_G=20, NewBlue_B=245
WRITE_STRUCT_OFFSET GangColorsRed offset Grove size Byte value NewBlue_R
WRITE_STRUCT_OFFSET GangColorsGreen offset Grove size Byte value NewBlue_G
WRITE_STRUCT_OFFSET GangColorsBlue offset Grove size Byte value NewBlue_B

CONST Flame_R=245, Flame_G=87, Flame_B=24
WRITE_STRUCT_OFFSET GangColorsRed offset Vagos size Byte value Flame_R
WRITE_STRUCT_OFFSET GangColorsGreen offset Vagos size Byte value Flame_G
WRITE_STRUCT_OFFSET GangColorsBlue offset Vagos size Byte value Flame_B

TERMINATE_THIS_CUSTOM_SCRIPT

 

Link to comment
Share on other sites

King Coldey

 

9 hours ago, OrionSR said:

This script should do the trick for you. Adjust the color settings to your preference, compile, and install the script with Sanny Builder. It'll change the blip color and map color of each gang, and can be adapted to Extended Gangwars for more gangs.

 

You may need to toggle an R2 mission, exit a gym, die or complete a gang war to get the map colors to update to the new color scheme.

 

{$CLEO .cs}
{$USE CLEO+}
//GangColors.txt
//WAIT 3000

CONST Byte=1, Word=2, Dword=4
CONST Ballas=0,Grove=1,Vagos=2,Rifa=3,DaNang=4,Mafia=5,Triad=6,Aztecas=7
CONST GangColorsRed = 0x8D1344, GangColorsGreen = 0x8D1350, GangColorsBlue = 0x8D135C

CONST Pink_R=242, Pink_G=35, Pink_B=214
WRITE_STRUCT_OFFSET GangColorsRed offset Ballas size Byte value Pink_R
WRITE_STRUCT_OFFSET GangColorsGreen offset Ballas size Byte value Pink_G
WRITE_STRUCT_OFFSET GangColorsBlue offset Ballas size Byte value Pink_B

CONST NewBlue_R=46, NewBlue_G=20, NewBlue_B=245
WRITE_STRUCT_OFFSET GangColorsRed offset Grove size Byte value NewBlue_R
WRITE_STRUCT_OFFSET GangColorsGreen offset Grove size Byte value NewBlue_G
WRITE_STRUCT_OFFSET GangColorsBlue offset Grove size Byte value NewBlue_B

CONST Flame_R=245, Flame_G=87, Flame_B=24
WRITE_STRUCT_OFFSET GangColorsRed offset Vagos size Byte value Flame_R
WRITE_STRUCT_OFFSET GangColorsGreen offset Vagos size Byte value Flame_G
WRITE_STRUCT_OFFSET GangColorsBlue offset Vagos size Byte value Flame_B

TERMINATE_THIS_CUSTOM_SCRIPT

 

I'll try now,thank you for helping btw

Edited by King Coldey
Link to comment
Share on other sites

King Coldey
11 hours ago, Strs said:

you still need it to change color existed marker in radar to any color you want? 

 

to do so you need first. marker handle so you can do what ever you want you cant put another marker to change it color if you want it badly ill give you script 

This is what I need,grove to be #FF00FF , ballas to be #007F00 , vagos #00FFFF , and aztecas #FFFF00 , thats what i need,i need your discord if you ok with that

Edited by King Coldey
Link to comment
Share on other sites

10 hours ago, King Coldey said:

This is what I need

Great. You should have all the information you need to adapt this script to your preferred colors. 
If you run into trouble then post your modified version of the script, and describe the problem and what you tried to resolve the issue.

Link to comment
Share on other sites

King Coldey
15 hours ago, OrionSR said:

Great. You should have all the information you need to adapt this script to your preferred colors. 
If you run into trouble then post your modified version of the script, and describe the problem and what you tried to resolve the issue.

Can you send me ur discord in private chat?

Link to comment
Share on other sites

here what you wanted 

 

{$Cleo}
0000:
07B4: set_player 0 gang_recruitment_enabled 1
//Colour ID of blip    
Const            
Red     = 0               
Green   = 1         
Blue    = 2             
White   = 3              
Yellow  = 4               
Purple  = -1489189635 //ID 5 it shows as red idk why             
Cyan    = 12430843//ID 6 Sometime its not showing exact Color            
Threat  = 7
Yellow  = 8
Orange  = -26196670 //Sa dont have Orange ID so 
Grey    = -170
Black   = 100
end

Const
Ballas  = 7  //Ballas) 
Grove   = 8  //Grove Street Families
Vagos   = 9  //Los Santos Vagos
Rifa    = 10 //San Fierro Rifa
DNB     = 11 //Da Nang Boys
Mafia   = 12 //Mafia
MCT     = 13 //Mountain Cloud Triad
Aztecas = 14 //Varrio Los Aztecas 
end
0006: 0@ = 0
while true
wait  10 
for   2@ = 0 to 175
call  @_Marker 1 _Traces 2@
end
end

:_Marker
0A90: 1@ = 0@ * 0x28 // int
000A: 1@ += 0xBA86F0
0A8E: 31@ = 1@ + 0 // ColourID
0A8D: 2@ = 31@ size 4 vp 0
0A8E: 31@ = 1@ + 4 // Entity
0A8D: 3@ = 31@ size 4 vp 0
0A8E: 31@ = 1@ + 37 // int
0A8D: 30@ = 31@ size 1 vp 0
call  @GetFlagtoVar 2 30@ 1 8@
0A8E: 31@ = 1@ + 38 // int
0A8D: 30@ = 31@ size 1 vp 0
call  @GetChartoVar 4 src_var 30@ src_flag 0 tgt_var 11@ tgt_flag 0 result 11@  
call  @GetChartoVar 4 src_var 30@ src_flag 1 tgt_var 11@ tgt_flag 1 result 11@
call  @GetChartoVar 4 src_var 30@ src_flag 2 tgt_var 12@ tgt_flag 0 result 12@ 
call  @GetChartoVar 4 src_var 30@ src_flag 3 tgt_var 12@ tgt_flag 1 result 12@
call  @GetChartoVar 4 src_var 30@ src_flag 4 tgt_var 12@ tgt_flag 2 result 12@
call  @GetChartoVar 4 src_var 30@ src_flag 5 tgt_var 12@ tgt_flag 3 result 12@   
if    and
       8@ <> 0
      11@ <> 0 
      12@ == 2 //Entity Ped
then  //Here you Can Change or Set Colors for Gangs marker or blip colors you can do to all gangs here 4 only for example as you asked 
call  @TypeandColor 4 _Base 1@ _Ped 3@ _ifGang > Ballas > Green 
call  @TypeandColor 4 _Base 1@ _Ped 3@ _ifGang > Grove > Purple 
call  @TypeandColor 4 _Base 1@ _Ped 3@ _ifGang >  Vagos > Cyan 
call  @TypeandColor 4 _Base 1@ _Ped 3@ _ifGang > Aztecas > Yellow 
end
ret 0

:TypeandColor
if    056D: ped 1@ defined
then  089F: ped 1@ pedtype 5@
if    5@ == Ballas
then  6@  = Purple
end
if    5@ == Grove
then  6@  = Green
end
if    5@ == Vagos
then  6@  = Yellow
end
if    5@ == Rifa
then  6@  = Blue
end
if    5@ == Aztecas
then  6@  = Cyan
end
if    5@ == DNB
then  6@  = Orange
end
if    5@ == MCT
then  6@  = Red
end
if    5@ == Mafia
then  6@  = Grey
end
if    and
003B: 2@ == 5@ // (int)
803B: 6@ == 3@ // (int)
then  call  @Handle 1 0@ MarkerHandle 4@
0165: set_marker 4@ color_to 3@ //you know what it is 
end
end
ret 0

{
-Green (Grove)
-Purple (Ballas)
-Yellow (Vagos)
-Cyan (Aztecas)
-Blue (Rifas)
-Orange (Da Nang)
-Red (Triads)
-Grey (Mafia)
Sapphire (Unused gang 9)
Black (Unused gang 10)
}

:Handle        
000A: 0@ + 0x14
0A8D: 1@ = 0@ size 2 vp 0
000E: 0@ - 0x14
0012: 1@ * 0x10000
0085: 2@ = 0@ // (int)
000E: 2@ - 0xBA86F0
0016: 2@ / 0x28
005A: 1@ + 2@ // (int) // mark handle
ret 1 1@

:GetFlagtoVar
if    08B9: bit 0@ test 1@
then  ret 1 1
end
ret 1 0

:GetChartoVar
if    08B9: bit 0@ tests 1@
then  08BF: bit 2@ setss 3@
else  08C5: bit 2@ clear 3@
end
ret 1 2@

Link to comment
Share on other sites

King Coldey

Works perfectly thanks strs and orion!

Edited by King Coldey
Link to comment
Share on other sites

  • 4 weeks later...
On 10/17/2023 at 7:41 PM, King Coldey said:

This is what I need,grove to be #FF00FF , ballas to be #007F00 , vagos #00FFFF , and aztecas #FFFF00 , thats what i need,i need your discord if you ok with that

did you manage to make the groove purple and the aztec yellow? Please give me your script. I tried to do as in the instructions but nothing worked.

Link to comment
Share on other sites

On 10/18/2023 at 10:16 PM, Strs said:

here what you wanted 

 

{$Cleo}
0000:
07B4: set_player 0 gang_recruitment_enabled 1
//Colour ID of blip    
Const            
Red     = 0               
Green   = 1         
Blue    = 2             
White   = 3              
Yellow  = 4               
Purple  = -1489189635 //ID 5 it shows as red idk why             
Cyan    = 12430843//ID 6 Sometime its not showing exact Color            
Threat  = 7
Yellow  = 8
Orange  = -26196670 //Sa dont have Orange ID so 
Grey    = -170
Black   = 100
end

Const
Ballas  = 7  //Ballas) 
Grove   = 8  //Grove Street Families
Vagos   = 9  //Los Santos Vagos
Rifa    = 10 //San Fierro Rifa
DNB     = 11 //Da Nang Boys
Mafia   = 12 //Mafia
MCT     = 13 //Mountain Cloud Triad
Aztecas = 14 //Varrio Los Aztecas 
end
0006: 0@ = 0
while true
wait  10 
for   2@ = 0 to 175
call  @_Marker 1 _Traces 2@
end
end

:_Marker
0A90: 1@ = 0@ * 0x28 // int
000A: 1@ += 0xBA86F0
0A8E: 31@ = 1@ + 0 // ColourID
0A8D: 2@ = 31@ size 4 vp 0
0A8E: 31@ = 1@ + 4 // Entity
0A8D: 3@ = 31@ size 4 vp 0
0A8E: 31@ = 1@ + 37 // int
0A8D: 30@ = 31@ size 1 vp 0
call  @GetFlagtoVar 2 30@ 1 8@
0A8E: 31@ = 1@ + 38 // int
0A8D: 30@ = 31@ size 1 vp 0
call  @GetChartoVar 4 src_var 30@ src_flag 0 tgt_var 11@ tgt_flag 0 result 11@  
call  @GetChartoVar 4 src_var 30@ src_flag 1 tgt_var 11@ tgt_flag 1 result 11@
call  @GetChartoVar 4 src_var 30@ src_flag 2 tgt_var 12@ tgt_flag 0 result 12@ 
call  @GetChartoVar 4 src_var 30@ src_flag 3 tgt_var 12@ tgt_flag 1 result 12@
call  @GetChartoVar 4 src_var 30@ src_flag 4 tgt_var 12@ tgt_flag 2 result 12@
call  @GetChartoVar 4 src_var 30@ src_flag 5 tgt_var 12@ tgt_flag 3 result 12@   
if    and
       8@ <> 0
      11@ <> 0 
      12@ == 2 //Entity Ped
then  //Here you Can Change or Set Colors for Gangs marker or blip colors you can do to all gangs here 4 only for example as you asked 
call  @TypeandColor 4 _Base 1@ _Ped 3@ _ifGang > Ballas > Green 
call  @TypeandColor 4 _Base 1@ _Ped 3@ _ifGang > Grove > Purple 
call  @TypeandColor 4 _Base 1@ _Ped 3@ _ifGang >  Vagos > Cyan 
call  @TypeandColor 4 _Base 1@ _Ped 3@ _ifGang > Aztecas > Yellow 
end
ret 0

:TypeandColor
if    056D: ped 1@ defined
then  089F: ped 1@ pedtype 5@
if    5@ == Ballas
then  6@  = Purple
end
if    5@ == Grove
then  6@  = Green
end
if    5@ == Vagos
then  6@  = Yellow
end
if    5@ == Rifa
then  6@  = Blue
end
if    5@ == Aztecas
then  6@  = Cyan
end
if    5@ == DNB
then  6@  = Orange
end
if    5@ == MCT
then  6@  = Red
end
if    5@ == Mafia
then  6@  = Grey
end
if    and
003B: 2@ == 5@ // (int)
803B: 6@ == 3@ // (int)
then  call  @Handle 1 0@ MarkerHandle 4@
0165: set_marker 4@ color_to 3@ //you know what it is 
end
end
ret 0

{
-Green (Grove)
-Purple (Ballas)
-Yellow (Vagos)
-Cyan (Aztecas)
-Blue (Rifas)
-Orange (Da Nang)
-Red (Triads)
-Grey (Mafia)
Sapphire (Unused gang 9)
Black (Unused gang 10)
}

:Handle        
000A: 0@ + 0x14
0A8D: 1@ = 0@ size 2 vp 0
000E: 0@ - 0x14
0012: 1@ * 0x10000
0085: 2@ = 0@ // (int)
000E: 2@ - 0xBA86F0
0016: 2@ / 0x28
005A: 1@ + 2@ // (int) // mark handle
ret 1 1@

:GetFlagtoVar
if    08B9: bit 0@ test 1@
then  ret 1 1
end
ret 1 0

:GetChartoVar
if    08B9: bit 0@ tests 1@
then  08BF: bit 2@ setss 3@
else  08C5: bit 2@ clear 3@
end
ret 1 2@

Can you send me the script? I tried to do as you suggested, but the builder gives me an error.

Link to comment
Share on other sites

6 hours ago, King Coldey said:

Im not allowed to give a script without strs premission

Why? are you not created it?

Link to comment
Share on other sites

King Coldey
On 11/17/2023 at 12:45 AM, DimaHecu said:

Why? are you not created it?

No,strs did,ask him.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.