0C29 doesn't accept command parameter

pwpwnpwn

Новичок
Автор темы
1
0
Hello, sorry for the English. :(
I want to search for player name in chat and print his chat. My code:

CLEO:
while true
wait 0  
    if 10@ == TRUE
    then
        0B35: samp 20@ = get_last_command_params
        0AD4: 21@ = scan_string 20@ format "%d" 10@

        0AC8: 1@ = ALLOCATE_MEMORY_SIZE 300
        0AC8: 2@ = ALLOCATE_MEMORY_SIZE 300
        0B75: samp get_chat_string 99 text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
       
        0B36: samp 30@ = get_player_nickname 10@

        if 0C29: 5@ = stristr string1 2@ string2 "%s" 30@
        then
            0AF8: samp add_message_to_chat "message of player: %s" color -1 1@
            wait 1000
        end
    free_memory 1@
    free_memory 2@
    end
end

The problem is here:
CLEO:
0C29: 5@ = stristr string1 2@ string2 "%s" 30@

Search player username in prefix. When i use text in string2 it works but not taking my parameter 30@..
Any fix?

Thank you.
 
Последнее редактирование модератором: