Derrekgamer
Active member
Its there any way to detect 2 chat lines from chat log?
and if both of lines was detected, then perform an action like: 0C29: $NOT_USED = stristr string1 1@ string2 "Text lines succesfully detected"
Example:
if
0C29: $NOT_USED = stristr string1 1@ string2 "Your car has been stolen by""
was detected
then
if
0C29: $NOT_USED = stristr string1 1@ string2 "You have 5 seconds to type the command /releaseveh"
was also detected
then
if both of lines are detected in chat
then
0C29: $NOT_USED = stristr string1 1@ string2 "Text lines succesfully detected"
If the first string its detected,: "hey whats'up" but the second string was not detected : "are you good"
then reset the proces, do noging and wait until you get all the 2 lines in chat line.
I tryed something like this but not succes :
It will keep saying me that : A jump to offset 0 found
@ajom @Parazitas
if u want to help
the lines will apear in the same secoond like this:
[09:08:46] Your car has been stolen by
[09:08:46 ]You have 5 seconds to type the command /releaseveh
and if both of lines was detected, then perform an action like: 0C29: $NOT_USED = stristr string1 1@ string2 "Text lines succesfully detected"
Example:
if
0C29: $NOT_USED = stristr string1 1@ string2 "Your car has been stolen by""
was detected
then
if
0C29: $NOT_USED = stristr string1 1@ string2 "You have 5 seconds to type the command /releaseveh"
was also detected
then
if both of lines are detected in chat
then
0C29: $NOT_USED = stristr string1 1@ string2 "Text lines succesfully detected"
If the first string its detected,: "hey whats'up" but the second string was not detected : "are you good"
then reset the proces, do noging and wait until you get all the 2 lines in chat line.
I tryed something like this but not succes :
Code:
{$CLEO}
REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY
WHILE TRUE
WAIT 0
IF
0B61: samp is_local_player_spawned
THEN
FOR 0@ = 98 TO 99 /
0AC8: 1@ = allocate_memory_size 260
0AC8: 2@ = allocate_memory_size 260
:detect1
0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
IF
0C29: $NOT_USED = stristr string1 1@ string2 "Your car has been stolen by" // Text 1 here
THEN
jump if false @detect1
if
:detect2
0C29: $NOT_USED = stristr string1 1@ string2 "You have 5 seconds to type the command /releaseveh" // Text 2 here
then
jump if false @detect2
wait 100
0AF8: samp add_message_to_chat "Text lines succesfully detected"
jump @continue1
end
:continue1
IF
0C29: $NOT_USED = stristr string1 1@ string2 "Text lines succesfully detected"
THEN
wait 500
0AF9: samp say_msg "/releaseveh"
end
end
end
end
It will keep saying me that : A jump to offset 0 found
@ajom @Parazitas
if u want to help
the lines will apear in the same secoond like this:
[09:08:46] Your car has been stolen by
[09:08:46 ]You have 5 seconds to type the command /releaseveh
Last edited: