Help to fix this code

HI
Can Somebody help me to fix it
When i join the game It's going to be slow motion

{$CLEO .cs}
0000:

REPEAT
WAIT 0
UNTIL 0AFA: is_samp_available // Wait until SAMP is available

:Start
WAIT 0

// Listen for chat messages
if
0C47: "Your Verification code is" found_in_string 1@ // Check if message contains the phrase
then
WAIT 100 // Small delay to ensure message is captured
0AF9: format 2@ "%s" 1@ // Store the entire chat message into variable 2@

// Extract the verification code
0B35: parse_string 2@ "Your Verification code is %s send it in chat" to_string 3@

// Send the extracted code in chat
Say 3@
end

jump @Start
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
475
Solutions
9
Reaction score
168
Location
Poland
What do you need? Write it step by step along with SA:MP version.
Send a screenshot of what this message looks like.
 

mohammad0070069

Active member
Joined
Mar 30, 2023
Messages
42
Reaction score
1
What do you need? Write it step by step along with SA:MP version.
Send a screenshot of what this message looks like.
I want to extract the code from the text below and send it in chat game
The code is variable and changes

Your verification code "its variable" send it in chat


this text send in every 1H in game chat
i want to automatic detect it and send.
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
475
Solutions
9
Reaction score
168
Location
Poland
Activation: GO
PHP:
{$CLEO .cs}
{$USE bitwise}
0000:

WHILE TRUE
WAIT 0

IF 0ADC:   test_cheat "GO"
THEN
    0B12: 31@ = 31@ XOR 1
    IF 31@ == 1
    THEN 0AD1: "on" 1337
    ELSE 0AD1: "off" 1337
    END
END

IF 31@ == 1
THEN
    0AC8: 0@ = allocate_memory_size 1024
    0AC8: 1@ = allocate_memory_size 1024
    0AB1: @getChatString 1 ChatID 99 _Returned: Text 0@ PrefixText 1@ Color 2@ PrefixColor 3@
    0AC8: 4@ = allocate_memory_size 1024
    0AB1: @DeleteColorCodesFromText 2 text 0@ memory_to_store_characters_as_text 4@
    0AC8: 5@ = allocate_memory_size 1024
    0AD3: 5@ = format "[Emla]"           
    IF 0AB1: @IfTextContains 2 String1 4@ String2 5@ _Returned: Text 6@
    THEN  
        0AB1: @GetLastCharacters 2 String 6@ Characters 57 rnt 7@
        0AB1: @DeleteLastChars 2 7@ 49           
        0AC8: 8@ = allocate_memory_size 1024
        0AD3: 8@ = format "%s" 7@             
        0AB1: @process_chat_input 2 SampVersionID 1 InputText 8@
        0AC9: free_allocated_memory 0@
        0AC9: free_allocated_memory 1@
        0AC9: free_allocated_memory 4@
        0AC9: free_allocated_memory 5@
        0AC9: free_allocated_memory 8@
        WAIT 20000                           
    END                       
END

END
0A93: terminate_this_custom_script
 

Attachments

  • _Script.cs
    22.1 KB · Views: 6

dphome

Well-known member
Joined
Mar 21, 2020
Messages
475
Solutions
9
Reaction score
168
Location
Poland
If you want to have text displayed in the center of the screen, follow the instructions below:
PHP:
0AB1: @process_chat_input 2 SampVersionID 1 InputText 8@
0AC9: free_allocated_memory 8@

to

0AD1: "%s" 5000 8@
//0AC9: free_allocated_memory 8@
 

mohammad0070069

Active member
Joined
Mar 30, 2023
Messages
42
Reaction score
1
If you want to have text displayed in the center of the screen, follow the instructions below:
PHP:
0AB1: @process_chat_input 2 SampVersionID 1 InputText 8@
0AC9: free_allocated_memory 8@

to

0AD1: "%s" 5000 8@
//0AC9: free_allocated_memory 8@
Can You Make It For Older Sanny builder?
My Sanny Builder does not Support $USE bitwise and...
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
475
Solutions
9
Reaction score
168
Location
Poland
If something isn't working, try taking more screenshots of the text. In theory, it should work. Experiment with these two functions:
PHP:
0AB1: @GetLastCharacters 2 String 6@ Characters 57 rnt 7@ // Modify the value to 57
0AB1: @DeleteLastChars 2 7@ 49 // Modify the value to 49
 

mohammad0070069

Active member
Joined
Mar 30, 2023
Messages
42
Reaction score
1
it work fine
But Deletes 2 additional characters
 

Attachments

  • sa-mp-013.png
    sa-mp-013.png
    41.6 KB · Views: 6

mohammad0070069

Active member
Joined
Mar 30, 2023
Messages
42
Reaction score
1
it work fine
But Deletes 2 additional characters
i fix it
Can You Do its work with 2 chat?
[Emla] And [Riazi]
[Riazi] Pasokhe1814 - 831(Tafriq) Ra Sari Ersal Konid Va Jayeze Begirid!
And
[Emla] Pasokhe "rv8939vap" Ra Sari Ersal Konid Va Jayeze Begirid!
Work with one of these two
 
Top