compare strings

noob213

Известный
Автор темы
33
2
why does not compare the text of the variable $p_name with the file 2@



CLEO:
alloc $p_name 50
0AC8: 14@ = allocate_memory_size 256

if                                          
    0A9A: 0@ = openfile "cleo\names.txt" mode "r"
    then
        wait 100
        0AC8: 2@ = allocate_memory_size 4096
        0C11: memset destination 2@ value 0 size 4096
        0AC8: 3@ = allocate_memory_size 96
    repeat
        if 0AD7: read_string_from_file 0@ to 3@ size 95
        then
            0C15: strcat destination 2@ source 3@
            0C11: memset destination 3@ value 0 size 96
        end
    until 0AD6: end_of_file 0@ reached
    0A9B: closefile 0@
    end
   

        while true
            wait 0
            if
            ON == 1
            then
            if
            0C21: stricmp string1 $p_name string2 2@
            then
            chatmsg "compare %s" -1 $p_name
             end
        end
    end      


:check2    
0BE5: raknet 10@ = get_hook_param PARAM_PACKETID
if 10@ == RPC_SCRCLIENTMESSAGE
then
0BE5: raknet 11@ = get_hook_param PARAM_BITSTREAM
0BE7: raknet 12@ = bit_stream_read 11@ type BS_TYPE_INT
0BE7: raknet 13@ = bit_stream_read 11@ type BS_TYPE_INT
0BE8: raknet bit_stream 11@ read_array 14@ size 13@
0C0D: struct 14@ offset 13@ size 1 = 0
if
0C29: 5@ = stristr string1 14@ string2 "the player"                    
then    
0AA5: call 0x8220AD num_params 3 pop 3 params $p_name "the player {00CCFF}%s{FFFFFF}" 5@                                            
IF  0029:   5@ >= 0
then
call @DeleteLastChars 2 $p_name 8              

0BE0: raknet hook_ret false
end
end    
end                  
0BE0: raknet hook_ret true
 
Последнее редактирование: