Hello gang, for hours I've been trying to find a way to fix my issue. So, my issue is that when someone does report for being DM the script cleo will spec the player who reported not the one who got reported, this problem is because this script is based on a string that it seems won't stop just for the "Reason" it was given, for me I wanted to only do spec on players that report for the only reason if they got stuck. Here is a look at my code, solutions: how can I limit a string and not going all the way with that text or can I just make another scan string in chat and someone exlude others and only do chat string on the one "stuck"
{$USE CLEO}
{$USE ini}
{$USE file}
{$USE newOpcodes}
{$USE bitwise}
{$USE clipboard}
{$USE CLEO+}
{$CLEO}
0662: "c0d"
thread "c0d"
0B34: samp register_client_command "stopspec" to_label @stopspec
:repeatxx
alloc 29@ 256
0b75: samp get_chat_string 99 text_to 29@ -1 -1 -1
if 0AD4: 18@ = scan_string 29@ format "Report from %s [ID %d, Level %d]: I'm stuck(placeholder). Help!" 11@ 12@ 13@ // this is an placeholder but the problem is the same even with different text since in here is no variable.
if 0AD4: 18@ = scan_string 29@ format "Report from %s [ID %d, Level %d]: - DM." 11@ 12@ 13@ // this is where the problems starts, because it doesn't have any variables, that %s will take any text.
then
wait 2000
0AF9: samp say_msg "/spec %d" 12@
wait 500
0AB1: @PressScreenshot 0
wait 5000
end
SAMP.CmdRet()
free 29@
wait 0
jump @repeatxx
:stopspec
chatmsg "{F5A25D}Modul a fost dezactivat." -1
0A93: end_custom_thread
SAMP.CmdRet()
: PressScreenshot
if 0AA2: 0@ = load_dynamic_library "samp.dll"
then
0@ += 0x119CBC // 0.3.7 R1 > Do screenshot
0A8C: write_memory 0@ size 4 value true virtual_protect 0
end
0AB2: cleo_return 0
SAMP.CmdRet()
:go
0AA2: 0@ = load_library "samp.dll"
0085: 1@ = 0@
1@ += 2203876
0A8D: 3@ = read_memory 1@ size 4 virtual_protect 1
0085: 2@ = 0@
2@ += 409616
ret 0
Thanks.
{$USE CLEO}
{$USE ini}
{$USE file}
{$USE newOpcodes}
{$USE bitwise}
{$USE clipboard}
{$USE CLEO+}
{$CLEO}
0662: "c0d"
thread "c0d"
0B34: samp register_client_command "stopspec" to_label @stopspec
:repeatxx
alloc 29@ 256
0b75: samp get_chat_string 99 text_to 29@ -1 -1 -1
if 0AD4: 18@ = scan_string 29@ format "Report from %s [ID %d, Level %d]: I'm stuck(placeholder). Help!" 11@ 12@ 13@ // this is an placeholder but the problem is the same even with different text since in here is no variable.
if 0AD4: 18@ = scan_string 29@ format "Report from %s [ID %d, Level %d]: - DM." 11@ 12@ 13@ // this is where the problems starts, because it doesn't have any variables, that %s will take any text.
then
wait 2000
0AF9: samp say_msg "/spec %d" 12@
wait 500
0AB1: @PressScreenshot 0
wait 5000
end
SAMP.CmdRet()
free 29@
wait 0
jump @repeatxx
:stopspec
chatmsg "{F5A25D}Modul a fost dezactivat." -1
0A93: end_custom_thread
SAMP.CmdRet()
: PressScreenshot
if 0AA2: 0@ = load_dynamic_library "samp.dll"
then
0@ += 0x119CBC // 0.3.7 R1 > Do screenshot
0A8C: write_memory 0@ size 4 value true virtual_protect 0
end
0AB2: cleo_return 0
SAMP.CmdRet()
:go
0AA2: 0@ = load_library "samp.dll"
0085: 1@ = 0@
1@ += 2203876
0A8D: 3@ = read_memory 1@ size 4 virtual_protect 1
0085: 2@ = 0@
2@ += 409616
ret 0
Thanks.