CLEO Help Unable to get ID of player

CLEO related
Status
Not open for further replies.

randomguy1234

Member
Joined
Oct 16, 2017
Messages
7
Reaction score
0
I am trying to make a cleo script which will sell a gun to player who has been aimed while pressing B on keyboard but for some reason the ID becomes "D" and /sellgun doesn't work. Here's the code-
Code:
{$CLEO .cs}

0000: NOP

:PEPE_1
wait 50
if
0AB0:   key_down 66
jf @PEPE_1
if
0AD2: 0@ = player $PLAYER_CHAR targeted_actor
jf @PEPE_1
0B2B: samp 1@ = get_player_id_by_actor_handle 0@
0B36: samp 2@ = get_player_nickname 1@
wait 500
0AF9: samp say_msg "/sellgun %d shotgun 0" 1@
0AF8: samp add_message_to_chat "Offered to %s - ID %d." color 0xFF6347 2@ 1@
wait 1000
jump @PEPE_1
 

batonkal

Active member
Joined
May 6, 2017
Messages
100
Reaction score
16
Location
Bosnia and Herzegovina
0AF9: samp say_msg "/sellgun %d shotgun 0" 1@

0AF9: doesn't have a formatting feature?

Try formatting using a format like

0AD3: 3@ = format "/sellgun %d shotgun 0" 1@

and then

0AF9: samp say_msg 3@
 
Status
Not open for further replies.
Top