CLEO Help Send message to all players on the server.

CLEO related
Status
Not open for further replies.

ciceuc

Member
Joined
Mar 4, 2020
Messages
17
Reaction score
1
Location
Baia Mare
I want a cleo script, that sends message (/sms %d ...) to all players on the server with a small delay between commands. I need the code, the message will be added by me.
 
D

Deleted member 46270

Guest
it is easy to do if you have the basic information about programming cleo or C++ etc..
just create loop through players, and send the message in the loop.
if necessary, add a run delay(2000MS will be fine for it) for server anti-spam protection.
 
Last edited:

ollydbg

Active member
Joined
Jun 3, 2017
Messages
39
Reaction score
22
If you don't need to enter a phone number, this code will work for you.
use it with the command /smsall (msg)
example: /smsall hi

PHP:
{$CLEO .cs}
0000:

repeat
wait 0
until 0AFA:
0B34: samp register_client_command "smsall" to_label @cmd_mycmd


    WHILE TRUE
        WAIT 0
        IF
        30@ == 1
        THEN
            30@ = 0
            0C8A: samp 1@ = get_max_player_id streamed_only 0
            FOR 0@ = 0 TO 1@
            IF
            0B23:  samp is_player_connected 0@
            THEN
                0AF9: "/sms %d %s" 0@ 5@
                WAIT 1000 // DELAY
                END
            END
        END
    END


:cmd_mycmd
0B35: samp 5@ = get_last_command_params
30@ = 1
0B43: samp cmd_ret
 

Attachments

  • smsall.cs
    17.9 KB · Views: 26
Last edited:

Mr ASR

Member
Joined
Nov 29, 2020
Messages
5
Reaction score
0
Location
Null
If you don't need to enter a phone number, this code will work for you.
use it with the command /smsall (msg)
example: /smsall hi

PHP:
{$CLEO .cs}
0000:

repeat
wait 0
until 0AFA:
0B34: samp register_client_command "smsall" to_label @cmd_mycmd


    WHILE TRUE
        WAIT 0
        IF
        30@ == 1
        THEN
            30@ = 0
            0C8A: samp 1@ = get_max_player_id streamed_only 0
            FOR 0@ = 0 TO 1@
            IF
            0B23:  samp is_player_connected 0@
            THEN
                0AF9: "/sms %d %s" 0@ 5@
                WAIT 1000 // DELAY
                END
            END
        END
    END


:cmd_mycmd
0B35: samp 5@ = get_last_command_params
30@ = 1
0B43: samp cmd_ret
Can you make /cmd <ldplayer around>?
 

ciceuc

Member
Joined
Mar 4, 2020
Messages
17
Reaction score
1
Location
Baia Mare
this works perfect
If you don't need to enter a phone number, this code will work for you.
use it with the command /smsall (msg)
example: /smsall hi

PHP:
{$CLEO .cs}
0000:

repeat
wait 0
until 0AFA:
0B34: samp register_client_command "smsall" to_label @cmd_mycmd


    WHILE TRUE
        WAIT 0
        IF
        30@ == 1
        THEN
            30@ = 0
            0C8A: samp 1@ = get_max_player_id streamed_only 0
            FOR 0@ = 0 TO 1@
            IF
            0B23:  samp is_player_connected 0@
            THEN
                0AF9: "/sms %d %s" 0@ 5@
                WAIT 1000 // DELAY
                END
            END
        END
    END


:cmd_mycmd
0B35: samp 5@ = get_last_command_params
30@ = 1
0B43: samp cmd_ret
works perfect, thank you
 
Last edited:
Status
Not open for further replies.
Top