CLEO Help Write automatically commands after joining a server

CLEO related
Status
Not open for further replies.

Excelds

Active member
Joined
Apr 17, 2021
Messages
101
Reaction score
11
Location
Earth
Hi i want someone that can code for me a cleo script that writes a commands that i specify in the script after joining in server and login. I want it to write them automatically after loging in. If it writes them immediatly before logging in my account it wont work in the server.
 

[RP]Foolish

Active member
Joined
Mar 18, 2020
Messages
68
Reaction score
36
Location
sea
yo this one works, but i need to change the wait time can u help me, cuz it writes 4 commands (/protect,/helmet,/togmsg,/clothes) it doesnt write /sgchange because it thinks im spamming commands , then it kicks me for command spawn, look at thispicture https://prnt.sc/12b6008
you can change the const COOLDOWN to a greater value

ok so 4 commands is still good, but sometimes when i click esc or write a command (sometimes only) my gta freezes then crashes
about crashes I think it might be about allocating memory constantly, so I moved it to the beginning of the script

PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

CONST
    COOLDOWN = 650 //milisseconds
END

alloc 0@ 128
alloc 1@ 128

while true
wait 0
    if 0B4C:  samp is_dialog_active -1
    then
        0BD8: samp get_dialog_caption 0@
        0BD7: samp get_dialog_text 1@
        if and
            0C29: $NOT_USED = stristr string1 0@ string2 "Влизане"
            0C29: $NOT_USED = stristr string1 1@ string2 "{FFFFFF}Добре Дошъл"
        then
            31@ = TRUE
        end
    end

    if and
        31@ == TRUE
        0B61:  samp is_local_player_spawned
    then
        if 0B4C:  samp is_dialog_active -1
        then
            //do nothing
        else
            wait COOLDOWN //wait spawn correctly
            0AF9: samp say_msg "/protect"
            wait COOLDOWN
            0AF9: samp say_msg "/helmet"
            wait COOLDOWN
            0AF9: samp say_msg "/togmsg"
            wait COOLDOWN
            0AF9: samp say_msg "/clothes"
            wait COOLDOWN
            0AF9: samp say_msg "/sgchange"
            end_thread //end this cleo
        end
    end
end
 
Last edited:

Excelds

Active member
Joined
Apr 17, 2021
Messages
101
Reaction score
11
Location
Earth
you can change the const COOLDOWN to a greater value


about crashes I think it might be about allocating memory constantly, so I moved it to the beginning of the script

PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

CONST
    COOLDOWN = 650 //milisseconds
END

alloc 0@ 128
alloc 1@ 128

while true
wait 0
    if 0B4C:  samp is_dialog_active -1
    then
        0BD8: samp get_dialog_caption 0@
        0BD7: samp get_dialog_text 1@
        if and
            0C29: $NOT_USED = stristr string1 0@ string2 "Влизане"
            0C29: $NOT_USED = stristr string1 1@ string2 "{FFFFFF}Добре Дошъл"
        then
            31@ = TRUE
        end
    end

    if and
        31@ == TRUE
        0B61:  samp is_local_player_spawned
    then
        if 0B4C:  samp is_dialog_active -1
        then
            //do nothing
        else
            wait COOLDOWN //wait spawn correctly
            0AF9: samp say_msg "/protect"
            wait COOLDOWN
            0AF9: samp say_msg "/helmet"
            wait COOLDOWN
            0AF9: samp say_msg "/togmsg"
            wait COOLDOWN
            0AF9: samp say_msg "/clothes"
            wait COOLDOWN
            0AF9: samp say_msg "/sgchange"
            end_thread //end this cleo
        end
    end
end
thanks worked, no crashes, everything works good. A moderator can lock this thread!
 
Status
Not open for further replies.
Top