Aasaad said:I don't want this cleo to work everytime, can anyone make it toggable with Numpad Insert button?
Basically, this cleo just /accept bodyguard everytime someone offers you armor
{$CLEO .cs}
0000:
REPEAT
WAIT 0
UNTIL 0AFA: is_samp_available
// MAKE THE CLEO ONLY WORK IF SAMPFUNCS IS LOADED
WHILE TRUE
WAIT 0
0AC8: 0@ = allocate_memory_size 260 // ALLOCATE MEMORY FOR THE CHAT STRING
0AB1: @GETCHATENTRYTEXT 1 id 99 to 0@ // THIS IS A FUNCTION THAT STORES THE LAST CHAT STRING INTO 0@
IF
0AB0: 109 {NUM -}
THEN
IF
20@ == FALSE
THEN
20@ = TRUE
PRINTF "~b~Enabled" 1337
ELSE
20@ = FALSE
PRINTF "~b~Disabled" 1337
END
END
IF AND
20@ == TRUE
0C18: 1@ = strstr string1 0@ string2 "bodyguard"
THEN
0AF9: samp say_msg "/accept bodyguard"
wait 1000
END
0AC9: free_allocated_memory 0@ // FREE THE MEMORY
END
:getChatEntryText
0AF7: samp 1@ = get_base
1@ += 0x21A0E4
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 0x136
0@ *= 252 // size of stChatEntry
005A: 1@ += 0@ // (int)
1@ += 28
0AB2: 1 1@
Parazitas said:Aasaad said:I don't want this cleo to work everytime, can anyone make it toggable with Numpad Insert button?
Basically, this cleo just /accept bodyguard everytime someone offers you armor
PHP:{$CLEO .cs} 0000: REPEAT WAIT 0 UNTIL 0AFA: is_samp_available // MAKE THE CLEO ONLY WORK IF SAMPFUNCS IS LOADED WHILE TRUE WAIT 0 0AC8: 0@ = allocate_memory_size 260 // ALLOCATE MEMORY FOR THE CHAT STRING 0AB1: @GETCHATENTRYTEXT 1 id 99 to 0@ // THIS IS A FUNCTION THAT STORES THE LAST CHAT STRING INTO 0@ IF 0AB0: 109 {NUM -} THEN IF 20@ == FALSE THEN 20@ = TRUE PRINTF "~b~Enabled" 1337 ELSE 20@ = FALSE PRINTF "~b~Disabled" 1337 END END IF AND 20@ == TRUE 0C18: 1@ = strstr string1 0@ string2 "bodyguard" THEN 0AF9: samp say_msg "/accept bodyguard" wait 1000 END 0AC9: free_allocated_memory 0@ // FREE THE MEMORY END :getChatEntryText 0AF7: samp 1@ = get_base 1@ += 0x21A0E4 0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0 1@ += 0x136 0@ *= 252 // size of stChatEntry 005A: 1@ += 0@ // (int) 1@ += 28 0AB2: 1 1@
Parazitas said:[shcode=cpp]
{$CLEO .cs}
0000:
REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY
WHILE TRUE
WAIT 0
0AC8: 2@ = allocate_memory_size 145
0AC8: 3@ = allocate_memory_size 145
0B75: samp get_chat_string 99 text_to 2@ prefix_to 3@ color_to 4@ prefix_color_to 5@
IF
0AB0: key_pressed 109 {NUM -}
THEN
0B12: 20@ = 20@ XOR TRUE
IF
20@ == TRUE
THEN
PRINTF "~b~Enabled" 1337
ELSE
PRINTF "~b~Disabled" 1337
END
END
IF AND
20@ == TRUE
0C18: 1@ = strstr string1 2@ string2 "bodyguard"
THEN
0AF9: samp say_msg "/accept bodyguard"
wait 1000
END
0AC9: free_allocated_memory 2@
0AC9: free_allocated_memory 3@
END
[/shcode]
{$CLEO .cs}
0000: NOP
REPEAT
wait 0
UNTIL 0AFA:
0AF8: samp add_message_to_chat "{FFFFFF}AutoAccept - {0085ff}[Credit: Robinson]"
0B34: "av" @CMD /// ACTIVATE and DE - ACTIVE with same command
0AC8: 2@ = allocate_memory_size 258
0AC8: 3@ = allocate_memory_size 258
WHILE TRUE
wait 0
FOR 1@ = 98 TO 99 /// Read line - almost last and last
0B75: samp get_chat_string 1@ text_to 2@ prefix_to 3@ color_to 4@ prefix_color_to 5@
IF
0@ == TRUE
THEN
IF
0C29: $NOT_USED = stristr string1 2@ string2 "wants to protect you for $200, type /accept bodyguard to accept."
THEN
say "/accept bodyguard"
wait 1000
END
END
END /// END FOR 1@ = 98 TO 99
END /// END WHILE TRUE
:CMD
0B12: 0@ = 0@ XOR TRUE
IF
0@ == FALSE
THEN
print "~y~Auto AcceptVest: ~r~off" 2000
ELSE
print "~y~Auto AcceptVest: ~g~on" 2000
END
0B43: