CLEO Help Get player Phone Number

CLEO related
Status
Not open for further replies.

KamikazeSripterul

Well-known member
Joined
Jun 30, 2019
Messages
353
Reaction score
23
Hello! I want to make this as a call function but i am not sure how to use those and how to put them so they actually work. So here is what you have to do.
1. you will have command /teamag <id> <id> <id> <id>
2. for each of those id's you will type /number <id>
3. you will take the phone number from this id (there are phone numbers starting with 0 too so you need to pick that up too)
here is a video to help you please let me know if you require more information. thank you in advance
 

Au_Phu

Active member
Joined
Jun 20, 2019
Messages
34
Reaction score
2
Location
Nothing
Hello! I want to make this as a call function but i am not sure how to use those and how to put them so they actually work. So here is what you have to do.
1. you will have command /teamag <id> <id> <id> <id>
2. for each of those id's you will type /number <id>
3. you will take the phone number from this id (there are phone numbers starting with 0 too so you need to pick that up too)
here is a video to help you please let me know if you require more information. thank you in advance
/number ID ??
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,133
Solutions
5
Reaction score
885
Location
Lithuania
I made code for faster reply couple weeks ago...
Code gets number from player last sent message.
So you can just use like:
/re MyText

PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

0B34: samp register_client_command "re" to_label @cmd

while true
wait 0

if
0B61: samp is_local_player_spawned
then
    0AC8: 0@ = allocate_memory_size 260
    0AC8: 1@ = allocate_memory_size 260
    0B75: samp get_chat_string 99 text_to 0@ prefix_to 1@ color_to 2@ prefix_color_to 3@
    if
    2@ == 0xFFFFFF00 // yellow color chat message
    then
        if
        0C29: $NOT_USED = stristr string1 0@ string2 "SMS from"
        then  
            0AB1: @GetPhoneNumber 1 String 0@ Numer 4@
        end
    end
end

end

:GetPhoneNumber
if
0C29: 4@ = stristr string1 0@ string2 "("
then
    4@ += 1
    0C17: 5@ = strlen 4@
    if
    0C29: 6@ = stristr string1 0@ string2 ")"
    then
        0C17: 7@ = strlen 6@
        0062: 5@ -= 7@  // (int)
        0C24: strncpy destination 4@ source 4@ size 5@
        0AB2: ret 1 4@
    end
end
0AB2: ret 0

:cmd
{
    Use:
    /re text
}
0B35: samp 0@ = get_last_command_params
say "/sms %s %s" 4@ 0@
0B43: samp cmd_ret
 

Attachments

  • gasdwads.jpg
    gasdwads.jpg
    17.1 KB · Views: 22
Status
Not open for further replies.
Top