CLEO Help Help sannybuilder

CLEO related
Status
Not open for further replies.

oMiCRoN

Member
Joined
Dec 7, 2018
Messages
11
Reaction score
1
How can i do a text including my id? Example:

:cmd_1
SAMP.IsCommandTyped(20@)
if
0AD4: 20@ = scan_string 20@ format "%d" 21@
then
0B36: samp 1@ = get_player_nickname 21@
0AF9: samp say_msg "Hi, my id is %d" 21@
end
SAMP.CmdRet()
And show in chat: Hi, my id is 1 or other id, my id in game, like if i have 685 id: "Hi, my id is 685" and the command be /myid without to put id after command (/myid).
I mean when i use /myid to say in chat "Hi, my id is (my id)"
I tried all variables, many opcodes and it no works, in .lua mod is like this:
local _, myId = sampGetPlayerIdByCharHandle(playerPed)
imgui.Text(string.format("text", sampGetPlayerNickname(myId)))
imgui.Text(u8(string.format('%s', os.date())))
How can i do this in sanny builder? i tried all things
 

oMiCRoN

Member
Joined
Dec 7, 2018
Messages
11
Reaction score
1
:cmd_2
SAMP.IsCommandTyped(0@)
If
0AD4: $NOT_USED = scan_string 0@ format "%d" 1@
Then
0B2B: samp 1@ = get_player_id_by_actor_handle $PLAYER_ACTOR
say "player id: %d" 1@
end
SAMP.CmdRet

almost, i need to use /command (any id) but i shows my id, i want to use only /command without any id
 

oMiCRoN

Member
Joined
Dec 7, 2018
Messages
11
Reaction score
1
But how can i do to say the name and not the id? Like when i type /command to say in chat "Hi, my name is (my name in-game)"?

I tried many ways but i can't do it...
That's one of my scripts (ways) i tried..:
:cmd_1
SAMP.IsCommandTyped(0@)
0B2B: samp 1@ = get_player_nickname_by_actor_handle $PLAYER_ACTOR
chatmsg "Hi, my name is %s" -1 1@
SAMP.CmdRet()

For id is:

:cmd_1
SAMP.IsCommandTyped(0@)
0B2B: samp 1@ = get_player_id_by_actor_handle $PLAYER_ACTOR
chatmsg "Hi, my id is %d" -1 1@
SAMP.CmdRet()

This is working (for id)

@Opcode.eXe
Opcode.eXe
if you know or other guys
 
Status
Not open for further replies.
Top