Derrekgamer
Active member
Hello ug base, i hope u can help me.. Im trying this hours and hours and no succes.
Im trying to make a code that will read the chat line, lets say the word "heeey" was detected in chat line, when that word was detected the code should do this:
say that word heeey in chat, and then stop read more chat lines untill a key taste is pressed. When the key was pressed then the code should start again reading chat lines.
I tryed this and many way but not work ..
All the other things work like a charm but the script wont stop reading the chat lines.. it should to wait for the key press and then continue reading lines again.
I need this to find someone instantly when him commited a crime, and there are more people that do that.. and the mod will switch from one to another lol...
Im trying to make a code that will read the chat line, lets say the word "heeey" was detected in chat line, when that word was detected the code should do this:
say that word heeey in chat, and then stop read more chat lines untill a key taste is pressed. When the key was pressed then the code should start again reading chat lines.
I tryed this and many way but not work ..
All the other things work like a charm but the script wont stop reading the chat lines.. it should to wait for the key press and then continue reading lines again.
I need this to find someone instantly when him commited a crime, and there are more people that do that.. and the mod will switch from one to another lol...
Code:
{$CLEO}
0AB1: call_scm_func @chatmsg 0
REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY
0B34: samp register_client_command "toggle" to_label @toggle
WHILE TRUE
WAIT 0
if 30@ == 1 //if you type that command it will change variable to 1
then
wait 500
if 30@ == 0
then continue
else
FOR 0@ = 99 TO 99 // Can be changed to 98 to 99, 97 to 99 - it reads the last amount of lines from the log. In this case, it reads just the last one.
0AC8: 1@ = allocate_memory_size 260
0AC8: 2@ = allocate_memory_size 260
if 30@ == 0
then continue
else
0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to $NOT_USED prefix_color_to $NOT_USED
If 30@ == 0
then continue
else
if
0AD4: $NOT_USED = scan_string 1@ format "{844185}DISPATCH >> {FFFFFF}%s (%d) HAS {ffcc00}COMITED A CRIME " 4@v 5@
THEN
wait 700
say "/find %d" 5@
if key_down 52
then continue
else
SAMP.CmdRet()
END
END
END
END
end
end
end
end
:toggle //command
0B12: 30@ = 30@ XOR 1
if 30@ == 1
then
0AF8: samp add_message_to_chat "{46FF00}Mod on!" color 0xFFFFFF
else
0AF8: samp add_message_to_chat "{46FF00}Mod of!" color 0xFFFFFF
end
SAMP.CmdRet()[CODE]