CLEO Help Help scan_string [Solved]

CLEO related
Status
Not open for further replies.

TheDjCody

Active member
Joined
Sep 6, 2018
Messages
40
Reaction score
5
I want my code scan Id player and text, but when i use /re 100 nre show me this: "/b /reportar 100 t =Ë" instead "/b /reportar 100 NRE"

This is the code:

Code:
{$CLEO .cs}

wait 3000
0B34: samp register_client_command "re" to_label @reportar
31@ = false
30@ = false

:re
wait 0
if
31@ == true
jf @re
if
SAMP.IsPlayerConnected(2@)
jf @noconectado
jump @listo
wait 100

:reportar
if
30@ == false
SAMP.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d %s" 2@ 9@
jf @uso
if
SAMP.IsPlayerConnected(2@)
jf @idinvalido
30@ = true
31@ = true
0B36: samp 4@ = get_player_nickname 2@
0AF9: samp say_msg "/b /reportar %d %s" 2@ 9@
0AF8: samp add_message_to_chat "Has reportado correctamente a %s, ID %d." color 0x6098D1 4@ 2@
samp.CmdRet()
goto @re

:noconectado
goto @re

:uso
0AF8: samp add_message_to_chat "Debes agregar el ID para reportar: /re <ID> <Razón> | Ejemplo /re 123 NRE" color 0xBFBFBF
SAMP.CmdRet
goto @re

:idinvalido
0AF8: samp add_message_to_chat "El ID que has colocado es invalido o el jugador está desconectado." color 0xBF0000
SAMP.CmdRet
goto @re

:listo
goto @re
 
Status
Not open for further replies.
Top