Hello, i have an issue. I am trying to make a script that will read the game's chat and all kinds of chats (including server chat, player chat) without using Sampfuncs, and if it sees the sentence "there is a fish" in the chat, it will automatically send the "/startfish" command once. I need to do it without using sampfuncs and my samp version is 0.3dl. Could you help? I'm getting crash like this:
Code:
{$CLEO .cs}
0000: NOP
REPEAT
wait 0 /// wait 10sec until samp is redy
Until 0AFA:
const
SAMP_CHAT_INFO_OFFSET_03DL = 0x2ACA10
FUNC_ADDTOCHATWND_03DL = 0x67650
FUNC_SAY_03DL = 0x5860
FUNC_SEND_CMD_03DL = 0x69340
end
0AD3: 0@ = format "/startfish"
WHILE TRUE
WAIT 0
if
0B61: samp is_local_player_spawned
then
0AC8: 0@ allocate_memory_size 260
0AC8: 1@ allocate_memory_size 260
0B75: samp get_chat_string 99 text_to 0@ prefix_to 1@ color_to 2@ prefix_color_to 3@
If
0C29: $NOT_USED = stristr string1 0@ string2 "there is a fish"
Then
0AB1: @SAY 1 text 0@
end
END
:SAY
//0AB1: @SAY 1 $text
IF 0AA2: 1@ = "samp.dll"
THEN
1@ += FUNC_SAY_03DL
0AA5: call 1@ num_param 1 pop 0 0@
END
0AB2: 0