Help auto type when afk

someone790

New member
Joined
Jul 16, 2024
Messages
3
Reaction score
0
IMG_20240716_111920.png
when entering afk mode the script will directly enter cmd /afk code
 

fsociety

Active member
Joined
Dec 6, 2016
Messages
72
Reaction score
2
I can easily make this in lua drop your discord and I'll help you. If not lua then just wait for someone else to make a cleo for you
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Press BG to activate like gta cheat code
PHP:
{$CLEO .cs}

0000:

REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

WHILE TRUE
   WAIT 0
 
IF 0B61:  samp is_local_player_spawned
THEN
    IF 0ADC:   test_cheat "BG"
    THEN
        IF 31@ == FALSE
        THEN
            31@ = TRUE
            0AD1: "~G~ENABLED" 1337
        ELSE
            31@ = FALSE
            0AD1: "~R~DISABLED" 1337
        END
    END
  
    IF 31@ == TRUE
    THEN
        FOR 0@ = 0 TO 2304
            IF 0C5D: samp textdraw 0@ is_exists
            THEN
                0AC8: 1@ = allocate_memory_size 260
                0C5A: samp textdraw 0@ get_string_to 1@
                IF 0C29: 2@ = stristr string1 1@ string2 "/afk"
                THEN
                    0209: 3@ = random_int_in_ranges 0 1000
                    WAIT 3@
                    0AC8: 4@ = allocate_memory_size 144
                    0AB1: @get_digits_to_print param_count 2 text 2@ memory_to_store_digits_as_text 4@
                    0AC8: 5@ = allocate_memory_size 144
                    0AD3: 5@ = format "/afk %s" 4@
                    0C8F: samp process_chat_input 5@
                    0AC9: free_allocated_memory 4@
                    0AC9: free_allocated_memory 5@
                END
                0AC9: free_allocated_memory 1@
            END
        END
    END
END

END

:get_digits_to_print
{
    0@ = text
    1@ = pointer to memory where digits will be stored as text
}
0C17: 31@ = strlen 0@
    for 30@ = 0 to 31@
        0085: 29@ = 0@ // copy pointer
        005A: 29@ += 30@  // add offset (as the loop progresses it becomes pointers to first-last character)
        0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character
        if and
        28@ >= 0x30 // '0'
        28@ <= 0x39 // '9'
        then
        0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1
        1@ += 1 // move to next address
        end
    end
0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination
0AB2: ret 0
 

Attachments

  • AFK.cs
    19.6 KB · Views: 2

someone790

New member
Joined
Jul 16, 2024
Messages
3
Reaction score
0
Press BG to activate like gta cheat code
PHP:
{$CLEO .cs}

0000:

REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

WHILE TRUE
   WAIT 0
 
IF 0B61:  samp is_local_player_spawned
THEN
    IF 0ADC:   test_cheat "BG"
    THEN
        IF 31@ == FALSE
        THEN
            31@ = TRUE
            0AD1: "~G~ENABLED" 1337
        ELSE
            31@ = FALSE
            0AD1: "~R~DISABLED" 1337
        END
    END
  
    IF 31@ == TRUE
    THEN
        FOR 0@ = 0 TO 2304
            IF 0C5D: samp textdraw 0@ is_exists
            THEN
                0AC8: 1@ = allocate_memory_size 260
                0C5A: samp textdraw 0@ get_string_to 1@
                IF 0C29: 2@ = stristr string1 1@ string2 "/afk"
                THEN
                    0209: 3@ = random_int_in_ranges 0 1000
                    WAIT 3@
                    0AC8: 4@ = allocate_memory_size 144
                    0AB1: @get_digits_to_print param_count 2 text 2@ memory_to_store_digits_as_text 4@
                    0AC8: 5@ = allocate_memory_size 144
                    0AD3: 5@ = format "/afk %s" 4@
                    0C8F: samp process_chat_input 5@
                    0AC9: free_allocated_memory 4@
                    0AC9: free_allocated_memory 5@
                END
                0AC9: free_allocated_memory 1@
            END
        END
    END
END

END

:get_digits_to_print
{
    0@ = text
    1@ = pointer to memory where digits will be stored as text
}
0C17: 31@ = strlen 0@
    for 30@ = 0 to 31@
        0085: 29@ = 0@ // copy pointer
        005A: 29@ += 30@  // add offset (as the loop progresses it becomes pointers to first-last character)
        0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character
        if and
        28@ >= 0x30 // '0'
        28@ <= 0x39 // '9'
        then
        0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1
        1@ += 1 // move to next address
        end
    end
0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination
0AB2: ret 0
THANK YOU VERY MUCHHHH!!!
 
Top