CLEO Help how to output variable on opcode 0ACD?

CLEO related

florezyatina

Member
Joined
Nov 3, 2021
Messages
17
Reaction score
0
Location
123
Code:
0B35: samp 1@ = get_last_command_params
0C1A: 1@ = atoi 1@
????????????????????????? what should be here?
0B43: samp cmd_ret
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
268
Location
Pluto
PHP:
:CmdHook
    // Use %d on the string if you want to write/read an integer valued variable
    // Use %f on the string if you want to write/read an float(with dot precision unit) valued variable
0B35: samp 1@ = get_last_command_params
If 0AD4: 1@ = scan_string 1@ format "%d" 0@ // 0@ now contains the value converted from the string
Then chatmsg "value: %d" -1 0@
Else chatmsg "you didn't type a number" -1
End
0B43: samp cmd_ret
 
Top