CLEO Help Get player color

CLEO related
Status
Not open for further replies.

renko

Active member
Joined
Jul 8, 2014
Messages
58
Reaction score
0
How can i use this function:
Code:
0B37: samp 2@ = get_player_color 1@
to get the player color ? To be more more specific, what is it returning to me ?
 

renko

Active member
Joined
Jul 8, 2014
Messages
58
Reaction score
0
Opcode.eXe link said:
You have to input the ID of the Player.

It will return the player color -> 0xFF FFFFFF
I wanted to know the format, thank you. And to you use it here ... ?
Code:
0ad3: 3@ = "%s~w~(~g~%d~w~)" 4@ 1@
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Vennom link said:
[quote author=Opcode.eXe link=topic=8422.msg48578#msg48578 date=1405695519]
You have to input the ID of the Player.

It will return the player color -> 0xFF FFFFFF
I wanted to know the format, thank you. And to you use it here ... ?
Code:
0ad3: 3@ = "%s~w~(~g~%d~w~)" 4@ 1@
[/quote]You can get the color by using 0x%X
Example:
0B37: samp 0@ = get_player_color 1@
0AF8: samp add_message_to_chat "The player's name's color is {A1F173}0x%X" color 0xFFFFFF 0@ 
 

renko

Active member
Joined
Jul 8, 2014
Messages
58
Reaction score
0
TH3RM4L link said:
[quote author=Vennom link=topic=8422.msg48581#msg48581 date=1405695828]
[quote author=Opcode.eXe link=topic=8422.msg48578#msg48578 date=1405695519]
You have to input the ID of the Player.

It will return the player color -> 0xFF FFFFFF
I wanted to know the format, thank you. And to you use it here ... ?
Code:
0ad3: 3@ = "%s~w~(~g~%d~w~)" 4@ 1@
[/quote]You can get the color by using 0x%X
Example:
0B37: samp 0@ = get_player_color 1@
0AF8: samp add_message_to_chat "The player's name's color is {A1F173}0x%X" color 0xFFFFFF 0@
[/quote]
Code:
0B37: samp 2@ = get_player_color 1@
Code:
0ac8: 3@ = 260
0ad3: 3@ = "%s~w~(~g~%d~w~)" 4@ 1@
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'CRED369' 30@
0AA5: call 0x718600 2 pop 2 30@ 3@
0342: enable_text_draw_centered 1
033F: set_text_draw_letter_size 0.2 0.7 
081C: draw_text_outline 1 RGBA 0 0 0 255
0340: set_text_draw_RGBA 255 255 255 255
033E: set_draw_text_position 576.5 122.0 GXT 'CRED369'  // Push
0ac9: 3@

I want to use the color here. I want the %s to be that color
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
._.

0ac8: 3@ = 260
0ad3: 3@ = "0x%X~w~(~g~%d~w~)" 4@ 1@
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'CRED369' 30@
0AA5: call 0x718600 2 pop 2 30@ 3@
0342: enable_text_draw_centered 1
033F: set_text_draw_letter_size 0.2 0.7
081C: draw_text_outline 1 RGBA 0 0 0 255
0340: set_text_draw_RGBA 255 255 255 255
033E: set_draw_text_position 576.5 122.0 GXT 'CRED369'  // Push
0ac9: 3@
 

renko

Active member
Joined
Jul 8, 2014
Messages
58
Reaction score
0
TH3RM4L link said:
._.

0ac8: 3@ = 260
0ad3: 3@ = "0x%X~w~(~g~%d~w~)" 4@ 1@
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'CRED369' 30@
0AA5: call 0x718600 2 pop 2 30@ 3@
0342: enable_text_draw_centered 1
033F: set_text_draw_letter_size 0.2 0.7
081C: draw_text_outline 1 RGBA 0 0 0 255
0340: set_text_draw_RGBA 255 255 255 255
033E: set_draw_text_position 576.5 122.0 GXT 'CRED369'  // Push
0ac9: 3@
You get me rong...%s is the player name...I want it to be colored with the color from the TAB using sampfuncs...
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Here's an example:

Code:
{$CLEO}

0000: NOP

0B34: samp register_client_command "cmd" to_label @cmd
31@ = false

:cmd2
wait 0
if
31@ == true
jf @cmd2
SAMP.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d" 2@
jf @cmd_ret
if
SAMP.IsPlayerConnected(2@)
jf @cmd_ret
3@ = SAMP.GetPlayerNickname(2@)
4@ = SAMP.GetPlayerColor(2@)
0AF8: "%s: {FFFFFF}me sucky sucky" 4@ 3@
31@ = false
SAMP.CmdRet
jump @cmd2

:cmd_ret
wait 0
31@ = false
SAMP.CmdRet
jump @cmd2

:cmd
wait 0
31@ = true
SAMP.CmdRet
jump @cmd2
I hope you get it.
 

renko

Active member
Joined
Jul 8, 2014
Messages
58
Reaction score
0
TH3RM4L link said:
Here's an example:

Code:
{$CLEO}

0000: NOP

0B34: samp register_client_command "cmd" to_label @cmd
31@ = false

:cmd2
wait 0
if
31@ == true
jf @cmd2
SAMP.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d" 2@
jf @cmd_ret
if
SAMP.IsPlayerConnected(2@)
jf @cmd_ret
3@ = SAMP.GetPlayerNickname(2@)
4@ = SAMP.GetPlayerColor(2@)
0AF8: "%s: {FFFFFF}me sucky sucky" 4@ 3@
31@ = false
SAMP.CmdRet
jump @cmd2

:cmd_ret
wait 0
31@ = false
SAMP.CmdRet
jump @cmd2

:cmd
wait 0
31@ = true
SAMP.CmdRet
jump @cmd2
I hope you get it.
yea, but is any way to use it with 0AD3 ?
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Vennom link said:
[quote author=TH3RM4L link=topic=8422.msg48604#msg48604 date=1405700506]
Here's an example:

Code:
{$CLEO}

0000: NOP

0B34: samp register_client_command "cmd" to_label @cmd
31@ = false

:cmd2
wait 0
if
31@ == true
jf @cmd2
SAMP.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d" 2@
jf @cmd_ret
if
SAMP.IsPlayerConnected(2@)
jf @cmd_ret
3@ = SAMP.GetPlayerNickname(2@)
4@ = SAMP.GetPlayerColor(2@)
0AF8: "%s: {FFFFFF}me sucky sucky" 4@ 3@
31@ = false
SAMP.CmdRet
jump @cmd2

:cmd_ret
wait 0
31@ = false
SAMP.CmdRet
jump @cmd2

:cmd
wait 0
31@ = true
SAMP.CmdRet
jump @cmd2
I hope you get it.
yea, but is any way to use it with 0AD3 ?
[/quote]Maybe 0AD3: 3@ = "{%X}%s~w~(~g~%d~w~)" 2@ 4@ 1@ but I'm not sure that it will work because it gets the alpha too... :fuck_you:
:celeral_guy: [member=111]springfield[/member]
 

renko

Active member
Joined
Jul 8, 2014
Messages
58
Reaction score
0
TH3RM4L link said:
[quote author=Vennom link=topic=8422.msg48632#msg48632 date=1405707264]
[quote author=TH3RM4L link=topic=8422.msg48604#msg48604 date=1405700506]
Here's an example:

Code:
{$CLEO}

0000: NOP

0B34: samp register_client_command "cmd" to_label @cmd
31@ = false

:cmd2
wait 0
if
31@ == true
jf @cmd2
SAMP.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d" 2@
jf @cmd_ret
if
SAMP.IsPlayerConnected(2@)
jf @cmd_ret
3@ = SAMP.GetPlayerNickname(2@)
4@ = SAMP.GetPlayerColor(2@)
0AF8: "%s: {FFFFFF}me sucky sucky" 4@ 3@
31@ = false
SAMP.CmdRet
jump @cmd2

:cmd_ret
wait 0
31@ = false
SAMP.CmdRet
jump @cmd2

:cmd
wait 0
31@ = true
SAMP.CmdRet
jump @cmd2
I hope you get it.
yea, but is any way to use it with 0AD3 ?
[/quote]Maybe 0AD3: 3@ = "{%X}%s~w~(~g~%d~w~)" 2@ 4@ 1@ but I'm not sure that it will work because it gets the alpha too... :fuck_you:
:celeral_guy: [member=111]springfield[/member]
[/quote]
It's not working...I need this because i don't want to print it on the chat...
 
Status
Not open for further replies.
Top