CLEO Help Capture Phone Number

CLEO related

Grecu

Member
Joined
Aug 16, 2024
Messages
7
Reaction score
0
{$CLEO .cs}


// Register commands
0B34: samp register_client_command "smsid" to_label @cmd_smsid


// Command handling for /smsid
:cmd_smsid
SAMP.IsCommandTyped(20@)
0AD4: 20@ = scan_string 20@ format "%d %s" 21@ 22@

if
0AD4: 21@ > 0 // Check if a valid player ID is provided
then
0B36: samp 1@ = get_player_nickname 21@ // Get the player's nickname using the ID
0B2C: samp send_client_command "/number %d" 21@ // Simulate the /number command
wait 1000 // Wait for the response to be processed

// Assuming the phone number is stored in a variable
// You might need a custom function here to capture the phone number from the chatbox or similar

// Simulate sending SMS using the retrieved phone number
0B2C: samp send_client_command "/sms %d %s" 1@ 22@
chatmsg "SMS sent to %d: %s" 1@ 22@ // Notify the user
else
chatmsg "Invalid Player ID. Syntax: /smsid <player id> <message>"
end

SAMP.CmdRet() // Ends the custom command processing



The code is generated with ChatGPT and I tried to find a solution to capture the phone number, brief explanation for the use of the code,
On the server there is this comand /sms <phone number> <message> and this command /number <player id> that shows you the player phone number, it is possible to whrite a script where I type /sms <player id> <message> and will send that message?
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
{$CLEO .cs}


// Register commands
0B34: samp register_client_command "smsid" to_label @cmd_smsid


// Command handling for /smsid
:cmd_smsid
SAMP.IsCommandTyped(20@)
0AD4: 20@ = scan_string 20@ format "%d %s" 21@ 22@

if
0AD4: 21@ > 0 // Check if a valid player ID is provided
then
0B36: samp 1@ = get_player_nickname 21@ // Get the player's nickname using the ID
0B2C: samp send_client_command "/number %d" 21@ // Simulate the /number command
wait 1000 // Wait for the response to be processed

// Assuming the phone number is stored in a variable
// You might need a custom function here to capture the phone number from the chatbox or similar

// Simulate sending SMS using the retrieved phone number
0B2C: samp send_client_command "/sms %d %s" 1@ 22@
chatmsg "SMS sent to %d: %s" 1@ 22@ // Notify the user
else
chatmsg "Invalid Player ID. Syntax: /smsid <player id> <message>"
end

SAMP.CmdRet() // Ends the custom command processing



The code is generated with ChatGPT and I tried to find a solution to capture the phone number, brief explanation for the use of the code,
On the server there is this comand /sms <phone number> <message> and this command /number <player id> that shows you the player phone number, it is possible to whrite a script where I type /sms <player id> <message> and will send that message?
I can make this simple code if you text me on discord Tuesday
 

fsociety

Active member
Joined
Dec 6, 2016
Messages
72
Reaction score
2
Having a ready to use script made for you for free, and still asking for cleo version because hes too lazy to install moonloader is on another level xD
Nono that was just my assumption, he had moonloader installed when i asked him he was kind i dont think hes one of those
 
Top