CLEO Help How to find this type of colour?

CLEO related
Status
Not open for further replies.

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
I have a mod made by i don't know who which can change colours from my hud but i don't know how to find the colours, is there any way to find this type of colours?

FOR EXAMPLE:

RED=-16776961
GREEN=-16711936
BLUE=-65536
YELLOW=-16711681

I use a converter of binary to hex but only the red is working, which converter i need use?
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Code:
:PEPE_23               
SAMP.IsCommandTyped(3@)
wait 0
if 
0AD4: 29@ = scan_string 3@ format "%s" 3@v  
else_jump @PEPE_277 
0AF2: 7@ = get_float_from_ini_file "cleo\checkpoints.ini" section 3@v key "X" 
0AF2: 8@ = get_float_from_ini_file "cleo\checkpoints.ini" section 3@v key "Y" 
0AF2: 9@ = get_float_from_ini_file "cleo\checkpoints.ini" section 3@v key "Z"
if 7@ <> 0.0
then
    03BC: 10@ = create_sphere_at 7@ 8@ 9@ radius 3.0
    0AF8: samp add_message_to_chat "CHECKPOINT \"%s\" LOADED!" color 56576 3@v
else
    0AF8: "%s not found" 56576 3@v
end
SAMP.CmdRet
jump @PEPE_232 
Like this?
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
springfield link said:
Code:
:PEPE_23               
SAMP.IsCommandTyped(3@)
wait 0
if 
0AD4: 29@ = scan_string 3@ format "%s" 3@v  
else_jump @PEPE_277 
0AF2: 7@ = get_float_from_ini_file "cleo\checkpoints.ini" section 3@v key "X" 
0AF2: 8@ = get_float_from_ini_file "cleo\checkpoints.ini" section 3@v key "Y" 
0AF2: 9@ = get_float_from_ini_file "cleo\checkpoints.ini" section 3@v key "Z"
if 7@ <> 0.0
then
    03BC: 10@ = create_sphere_at 7@ 8@ 9@ radius 3.0
    0AF8: samp add_message_to_chat "CHECKPOINT \"%s\" LOADED!" color 56576 3@v
else
    0AF8: "%s not found" 56576 3@v
end
SAMP.CmdRet
jump @PEPE_232 
Like this?

Something like that but that 7@ must check the section 3@v for example "[pepe]" so if it exists then load the checkpoint:

7@ = read string from ini file "cleo\checkpoints.ini" section 3@v <--- check 3@v from the ini file if exist or not

Code:
if 7@ <> [pepe] // check this, section 3@v from the ini file
then
    03BC: 10@ = create_sphere_at 7@ 8@ 9@ radius 3.0
    0AF8: samp add_message_to_chat "CHECKPOINT \"%s\" LOADED!" color 56576 3@v
else
    0AF8: "%s not found" 56576 3@v
end

My english is a shit maybe you don't understand. Only check if that %s of /loadcps exist or not.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
That's the easiest way. There's no opcode to check that. Harder way is to open .ini file using
0A9A: $hFILE = openfile "settings.ini" mode 0x72  and read the whole file and see if string 3@v exists in file.
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
springfield link said:
That's the easiest way. There's no opcode to check that. Harder way is to open .ini file using
0A9A: $hFILE = openfile "settings.ini" mode 0x72  and read the whole file and see if string 3@v exists in file.

What is that 0x72 and how to put that check? Must be something like this?

Code:
:PEPE_23               
SAMP.IsCommandTyped(3@)
wait 0
if 
0AD4: 29@ = scan_string 3@ format "%s" 3@v  
else_jump @PEPE_277 
if 
0A9A: $hFILE = openfile "checkpoints.ini" mode 0x72 // how to check 3@v here?
then
0AF2: 7@ = get_float_from_ini_file "cleo\checkpoints.ini" section 3@v key "X" 
0AF2: 8@ = get_float_from_ini_file "cleo\checkpoints.ini" section 3@v key "Y" 
0AF2: 9@ = get_float_from_ini_file "cleo\checkpoints.ini" section 3@v key "Z" 
else
0AF8: "%s NOT FOUND" 3@v
end
SAMP.CmdRet
jump @PEPE_232
 
Status
Not open for further replies.
Top