CLEO Help Auto SMS bot

CLEO related

qBogdan

Member
Joined
Aug 8, 2019
Messages
17
Reaction score
1
Hi, I need some help too. I need a mod who automatically send sms to all connected players (from id 0 to id 999) with a deelay between them. First you have to type the command /number <ID> to find out the person's phone number, then / sms <phone number> to send the sms. I would need an automation of this process because it would help me a lot in advertising, but especially in recruiting members. When I type the command /sms <id> in the chat something like: Phone number is "12345 ..." will appear. I need to copy that number and then the mod automatically type command: /sms <phonenumber> < TEXT>
Thank you!
 

Juli4n

Active member
Joined
Mar 31, 2021
Messages
43
Solutions
1
Reaction score
19
Location
Argentina
(Not tested, report bug's or details)
Edit it as you see fit! (Of course, if it is not a very advanced code for you)
(You need SAMPFUNCS and SA-MP R1, I saw you use the required so I didn't need to ask)
C#:
{$CLEO .cs}

0000:

while 8AFA:
    wait 0
end

0AC8: 30@ = allocate_memory_size 260 // Memory for SMS text
0C11: memset destination 30@ value 0 size 260 // Clean memory
0AD3: 30@ = format "Hi!" // Enter here the text you want to send

0AC8: 31@ = allocate_memory_size 260 // Memory for chat
0C11: memset destination 31@ value 0 size 260 // Clean memory

:Main
while 0AB0:   key_pressed 88 {X} // If an error occurs, the script does not start again until the X key is released.
    wait 0
end
while true
    wait 0
    if 8B8C:    samp is_cursor_active // Is not cursor active (Prevent activation while typing)
    then
        if 0AB0:   key_pressed 88 {X} // Press the X key to start the script
        then
            while 0AB0:   key_pressed 88 {X} // Release the X key to start the script :)
                wait 0
            end
            33@ = 10000 // Avoid possible script delay after first activation
            0AF8: samp add_message_to_chat "Script started." color 0xFF00FF00
            for 0@ = 0 to 999 // 0@ = ID user
                if 0B23:  samp is_player_connected 0@
                then
                    while 33@ < 1200 {Wait 1200ms} // (Set necessary delay; or remove if have no limit of commands per seconds)
                        wait 0
                    end
                    0AF9: samp say_msg "/number %d" 0@
                    32@ = 0 // Reset timer 1
                    33@ = 0 // Reset timer 2
                    while true
                        wait 0
                        if 8B8C:    samp is_cursor_active // Is not cursor active (Prevent activation while typing)
                        then
                            if 0AB0:   key_pressed 88 {X} // Press the X key to stop the script
                            then
                                while 0AB0:   key_pressed 88 {X} // Release the X key to stop the script :)
                                    wait 0
                                end
                                0C11: memset destination 31@ value 0 size 260 // Clean memory for chat
                                0AF8: samp add_message_to_chat "Script stopped." color 0xFF00FF00
                                jump @Main
                            end
                        end
                        // (Separator) | Phosphorus i love you <3
                        if 32@ > 5000 {Wait 5000ms} // If the line is not detected in 5 seconds, stop the script
                        then       
                            0C11: memset destination 31@ value 0 size 260 // Clean memory for chat
                            0AF8: samp add_message_to_chat "Script stopped." color 0xFF00FF00
                            0002: jump @Main
                        end
                        // (Separator) | Phosphorus i love you <3
                        0B75: samp get_chat_string 99{99 = Last chat line} text_to 31@ prefix_to $NOT_USED color_to $NOT_USED prefix_color_to $NOT_USED // Read chat
                        if 0C29: $NOT_USED = stristr string1 31@ string2 "Phone number is" // Part of the line you want to detect
                        then
                            if 0AD4: $NOT_USED = scan_string 31@ format "%d" 1@ // 1@ = Number user
                            then
                                0C11: memset destination 31@ value 0 size 260 // Clean memory for chat
                                while 33@ < 1200 {Wait 1200ms} // (Set necessary delay; or remove if have no limit of commands per seconds)
                                    wait 0
                                end
                                0AF9: samp say_msg "/sms %d %s" 1@ 30@ // 1@ = Number user | 30@ = SMS text
                                33@ = 0 // Reset timer 2
                            end
                        end
                    end
                end
            end
            0AF8: samp add_message_to_chat "End of script." color 0xFF00FF00
        end
    end
end
 
Last edited:

Tuzas

Active member
Joined
Nov 1, 2019
Messages
123
Reaction score
71
Location
null
Hi, I need some help too. I need a mod who automatically send sms to all connected players (from id 0 to id 999) with a deelay between them. First you have to type the command /number <ID> to find out the person's phone number, then / sms <phone number> to send the sms. I would need an automation of this process because it would help me a lot in advertising, but especially in recruiting members. When I type the command /sms <id> in the chat something like: Phone number is "12345 ..." will appear. I need to copy that number and then the mod automatically type command: /sms <phonenumber> < TEXT>
Thank you!
give me your discord, or post some photos of how it looks, i can create more functional bot for you
 

qBogdan

Member
Joined
Aug 8, 2019
Messages
17
Reaction score
1
Unfortunately, I crash when I enter in game. I have clean GTA with the latest version of sampfuncs and the latest version of cleo. I don t have any mods.
 

qBogdan

Member
Joined
Aug 8, 2019
Messages
17
Reaction score
1
This is what happen when i enter in game...
I also tried older sampfuncs and cleo and was same
 

Attachments

  • Screenshot (3).png
    Screenshot (3).png
    56.9 KB · Views: 39

petriqqq

Member
Joined
Feb 13, 2022
Messages
16
Reaction score
0
Location
Ma-ta
That stops the script directly after /number x .. no sending out any sms..
(Not tested, report bug's or details)
Edit it as you see fit! (Of course, if it is not a very advanced code for you)
(You need SAMPFUNCS and SA-MP R1, I saw you use the required so I didn't need to ask)
C#:
{$CLEO .cs}

0000:

while 8AFA:
    wait 0
end

0AC8: 30@ = allocate_memory_size 260 // Memory for SMS text
0C11: memset destination 30@ value 0 size 260 // Clean memory
0AD3: 30@ = format "Hi!" // Enter here the text you want to send

0AC8: 31@ = allocate_memory_size 260 // Memory for chat
0C11: memset destination 31@ value 0 size 260 // Clean memory

:Main
while 0AB0:   key_pressed 88 {X} // If an error occurs, the script does not start again until the X key is released.
    wait 0
end
while true
    wait 0
    if 8B8C:    samp is_cursor_active // Is not cursor active (Prevent activation while typing)
    then
        if 0AB0:   key_pressed 88 {X} // Press the X key to start the script
        then
            while 0AB0:   key_pressed 88 {X} // Release the X key to start the script :)
                wait 0
            end
            33@ = 10000 // Avoid possible script delay after first activation
            0AF8: samp add_message_to_chat "Script started." color 0xFF00FF00
            for 0@ = 0 to 999 // 0@ = ID user
                if 0B23:  samp is_player_connected 0@
                then
                    while 33@ < 1200 {Wait 1200ms} // (Set necessary delay; or remove if have no limit of commands per seconds)
                        wait 0
                    end
                    0AF9: samp say_msg "/number %d" 0@
                    32@ = 0 // Reset timer 1
                    33@ = 0 // Reset timer 2
                    while true
                        wait 0
                        if 8B8C:    samp is_cursor_active // Is not cursor active (Prevent activation while typing)
                        then
                            if 0AB0:   key_pressed 88 {X} // Press the X key to stop the script
                            then
                                while 0AB0:   key_pressed 88 {X} // Release the X key to stop the script :)
                                    wait 0
                                end
                                0C11: memset destination 31@ value 0 size 260 // Clean memory for chat
                                0AF8: samp add_message_to_chat "Script stopped." color 0xFF00FF00
                                jump @Main
                            end
                        end
                        // (Separator) | Phosphorus i love you <3
                        if 32@ > 5000 {Wait 5000ms} // If the line is not detected in 5 seconds, stop the script
                        then      
                            0C11: memset destination 31@ value 0 size 260 // Clean memory for chat
                            0AF8: samp add_message_to_chat "Script stopped." color 0xFF00FF00
                            0002: jump @Main
                        end
                        // (Separator) | Phosphorus i love you <3
                        0B75: samp get_chat_string 99{99 = Last chat line} text_to 31@ prefix_to $NOT_USED color_to $NOT_USED prefix_color_to $NOT_USED // Read chat
                        if 0C29: $NOT_USED = stristr string1 31@ string2 "Phone number is" // Part of the line you want to detect
                        then
                            if 0AD4: $NOT_USED = scan_string 31@ format "%d" 1@ // 1@ = Number user
                            then
                                0C11: memset destination 31@ value 0 size 260 // Clean memory for chat
                                while 33@ < 1200 {Wait 1200ms} // (Set necessary delay; or remove if have no limit of commands per seconds)
                                    wait 0
                                end
                                0AF9: samp say_msg "/sms %d %s" 1@ 30@ // 1@ = Number user | 30@ = SMS text
                                33@ = 0 // Reset timer 2
                            end
                        end
                    end
                end
            end
            0AF8: samp add_message_to_chat "End of script." color 0xFF00FF00
        end
    end
end
 
Top