ajom
Well-known member
Current Version: 0.0.1
Information:
Source Code:
NOTICE:
Credits:
Information:
- This Script Allows you to change GTA SA HUD related colors. Like:
- Text Colors(Like Weapon Ammo, Radio, Car Name)
- Bar Colors(Like Health, Armor, OxyGen Border)
- Map Cross Color
- Wanted level Color
- Main menu title border
- Radar Blip Colors
- And Many MORE!
- HUD Colors that are available on this script are:
- Rainbow Color - the HUD Varies its Color in a rainbow fashion.
- Custom Solid Color - using the .ini configuration to change a certain HUD with a custom ARGB color.
- Default Color - No change on the HUD Color.
- In Case that you want to change the settings while playing, You can Optionally type like a normal cheat the word reloadcolors and the Settings will be reloaded again from the HUD Colors.ini .
- Put HUD Colors.cs and HUD Colors.ini at your Cleo Directory
- HUD Colors.ini is not allowed to be uploaded here at UGBASE, here is what you need to do:
- At your Cleo Directory, create a blank text file and name it as HUD Colors.ini .
- Copy the Contents of the HUD Colors.ini Spoiler below and Paste it at your HUD Colors.ini
Code:
[SETTINGS]
# type the word "reloadcolors" InGame to reload the settings
# How Many MilliSeconds will it take for the Color to change by one variant?
# LOW ChangePeriod Values results FASTER change in color
# HIGH ChangePeriod Values results SLOWER change in color
# Example Cases:
# Using the Formula: ChangePeriod = n * 1000.0/255.0
# if ChangePeriod = 1.960784313725490196078431372549, it takes n=0.5 second for "red to reach yellow"
# if ChangePeriod = 3.921568627450980392156862745098, it takes n=1 second for "red to reach yellow"
# if ChangePeriod = 7.8431372549019607843137254901961, it takes n=2 seconds for "red to reach yellow"
ChangePeriod = 7.8431372549019607843137254901961 # Only Works on Rainbow Colors!
# Put "1" to an HUD Color ID to Retain its Original Color(No Color Modification)
# Put "2" to an HUD Color ID to make it "Rainbow Color"
# Put any Number to make the HUD Color ID a Solid Color in ARGB Format
# ARGB(Alpha,Red,Green,Blue) in Hex = 0xAARRGGBB
# Example:
# HUDCID1 = 0xFF0000FF # Make the Money Color Pure Blue
HUDCID0 = 1 # Health string / enemy color / red marker / Any Red Text Formatted with '~r~'
HUDCID1 = 2 # Money color / car name color / Any Green Text Formatted with '~g~'
HUDCID2 = 2 # Any Blue Text Formatted with '~b~'
HUDCID3 = 2 # San Andreas Text(White) / Weapon Ammo / Swimming Oxygen(Blue)
HUDCID4 = 1 # Armour Bar, White Stuff
HUDCID5 = 2 # Main menu title border
HUDCID6 = 2 # Map Lines(Brown) / Wanted level(Yellow)
HUDCID7 = 2 # ~~~~~~~~~~~~~~UNKNOWN~~~~~~~~~~~~~~ Pink, Purple Stuff
HUDCID8 = 2 # Radio Text (Gray)
HUDCID9 = 2 # ~~~~~~~~~~~~~~UNKNOWN~~~~~~~~~~~~~~ Dark Red Stuff
HUDCID10 = 2 # ~~~~~~~~~~~~~~UNKNOWN~~~~~~~~~~~~~~ Dark Green Stuff
HUDCID11 = 2 # Any Yellow Text Formatted with '~y~'
HUDCID12 = 2 # Panel Text (Blue/Gray)
HUDCID13 = 2 # Blue Radar Blips
HUDCID14 = 2 # ~~~~~~~~~~~~~~UNKNOWN~~~~~~~~~~~~~~ Yellow Variety
HUDCID15 = 2 # ~~~~~~~~~~~~~~UNKNOWN~~~~~~~~~~~~~~ Transparent
NoBlackRainbow = 1 # Disables the Blackish Algorithm of HUD Rainbow Coloring
Source Code:
Code:
{$CLEO}
03A4: script_name 'Colorer'
const
RAINBOW = 31@
TICKCOUNT = 30@
CHANGEPERIOD = 29@
FLOATSTACK = 28@
BOOLEANS = 27@
NOBLACKRAINBOW = 0
end
// save default settings
0AC6: 0@ = label @DefaultIDColors pointer
for 1@ = 0xBAB22C to 0xBAB268 step 4 // HUD Colors PTRs
0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
0A8C: write_memory 0@ size 4 value 2@ virtual_protect 0
0@ += 4
end
//
gosub @ReadSettings
RAINBOW = 0
while true
wait 0
if 0ADC: test_cheat "reloadcolors"
then
gosub @ReadSettings
0ACD: show_text_highpriority "~y~AJOM's HUD Colors: ~g~Settings Reloaded!" time 1000
end
// Explode Color to RED = 0@ , Green = 1@ , Blue = 2@
0B10: 0@ = RAINBOW AND 0xFF
0B10: 1@ = RAINBOW AND 0xFF00
0B1C: 1@ >>= 8
0B10: 2@ = RAINBOW AND 0xFF0000
0B1C: 2@ >>= 16
//
// AJOM's Rainbow Algorithm
// Compute The Color Delta
0A8F: 3@ = TIMERA - TICKCOUNT
0085: TICKCOUNT = TIMERA
0093: 3@ = integer 3@ to_float
0073: 3@ /= CHANGEPERIOD
005B: FLOATSTACK += 3@
0087: 3@ = FLOATSTACK
0092: 3@ = float 3@ to_integer
if 3@ > 0
then FLOATSTACK = 0.0
else continue
end
//
if and
003B: 1@ == 2@
0@ > 0
1@ > 0
2@ > 0
then
if 08B7: test BOOLEANS bit NOBLACKRAINBOW
then 0@ = 255
else 0062: 0@ -= 3@
end
0062: 1@ -= 3@
0062: 2@ -= 3@
else
if and
0@ < 255
1@ == 0
2@ == 0
then 005A: 0@ += 3@
else
if and
0@ == 255
1@ < 255
2@ == 0
then 005A: 1@ += 3@
else
if and
0@ > 0
1@ == 255
2@ == 0
then 0062: 0@ -= 3@
else
if and
0@ == 0
1@ == 255
2@ < 255
then 005A: 2@ += 3@
else
if and
0@ == 0
1@ > 0
2@ == 255
then 0062: 1@ -= 3@
else
if and
0@ < 255
1@ == 0
2@ == 255
then 005A: 0@ += 3@
else
if and
0@ == 255
1@ < 255
2@ == 255
then 005A: 1@ += 3@
end
end
end
end
end
end
end
end
if 0@ < 0
then 0@ = 0
else
if 0@ > 255
then 0@ = 255
else
end
end
if 1@ < 0
then 1@ = 0
else
if 1@ > 255
then 1@ = 255
else
end
end
if 2@ < 0
then 2@ = 0
else
if 2@ > 255
then 2@ = 255
else
end
end
//
// Join Color
RAINBOW = 0xFF000000
0B11: RAINBOW = RAINBOW OR 0@
0B1D: 1@ <<= 8
0B11: RAINBOW = RAINBOW OR 1@
0B1D: 2@ <<= 16
0B11: RAINBOW = RAINBOW OR 2@
//
0AC6: 0@ = label @MYIDColors pointer
for 1@ = 0xBAB22C to 0xBAB268 step 4 // HUD Colors PTRs
0A8D: 2@ = read_memory 0@ size 4 virtual_protect 0
if 2@ == 2 // use rainbow color
then 0A8C: write_memory 1@ size 4 value RAINBOW virtual_protect 0
else
if 2@ <> 1 // not disabled
then 0A8C: write_memory 1@ size 4 value 2@ virtual_protect 0
end
end
0@ += 4
end
end
:ReadSettings
if 8AF2: not CHANGEPERIOD = read_float_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "ChangePeriod"
then CHANGEPERIOD = 3.921568627450980392156862745098
else
if CHANGEPERIOD == 0.0
then CHANGEPERIOD = 0.0001
end
end
if 0AF0: 0@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "NoBlackRainbow"
then
if 0@ == true
then 08BD: set BOOLEANS bit NOBLACKRAINBOW
else 08C3: clear BOOLEANS bit NOBLACKRAINBOW
end
end
0AC6: 0@ = label @MYIDColors pointer
0AC6: 2@ = label @DefaultIDColors pointer
3@ = 0xBAB22C
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID0"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID1"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID2"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID3"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID4"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID5"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID6"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID7"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID8"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID9"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID10"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID11"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID12"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID13"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID14"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
if 8AF0: not 1@ = read_int_from_ini_file "cleo\HUD Colors.ini" section "SETTINGS" key "HUDCID15"
then 1@ = 2 // Rainbow Color
end
gosub @savesettingtomemory
return
:savesettingtomemory
0A8C: write_memory 0@ size 4 value 1@ virtual_protect 0
if 1@ == 1 // disabled
then
0A8D: 1@ = read_memory 2@ size 4 virtual_protect 0
0A8C: write_memory 3@ size 4 value 1@ virtual_protect 0
end
3@ += 4
2@ += 4
0@ += 4
return
:DefaultIDColors
hex
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
end
:MYIDColors
hex
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
end
NOTICE:
- This Script will Work on Both Single Player and ANY SAMP Version
Credits:
- AJOM - This CLEO and Code Version's Author
Attachments
Last edited: