Detect player name from chat

Status
Not open for further replies.

domas1993

New member
Joined
Aug 14, 2018
Messages
3
Reaction score
0
* Name of the mod (if the mod doesn't exist, you don't have to tell one):
* Where you saw it (not the server, we mean if you saw any videos/screenshots about it or not): no
* What do you want (the most important part, explain this carefully) Would be nice if someone wrote a code that detects player in chat for example when player requests help: "[Playername] is requesting help" i need that player name and with that player name i need to write it in chat to accept the request "/accept [playername]"
* Details (add more details to your request) I tried my best explaining i hope its clear
* On/off key (specify it): Toggle key so it can automatically accept the request when it detects player
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
PHP:
{$CLEO .cs}

0000: NOP

REPEAT
wait 0
UNTIL 0AFA:

WHILE TRUE
wait 0

IF
0B61:  samp is_local_player_spawned
THEN
    0AC8: 1@ = allocate_memory_size 260
    0AC8: 2@ = allocate_memory_size 260
    FOR 0@ = 98 TO 99 /// GET 98 AND 99 CHAT LINES
        0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
        IF
        0C29: $NOT_USED = stristr string1 1@ string2 "Black_Dady" /// detect text
Then
            chatmsg "Detected !" -1
        END
    END
END

END
END
 
Last edited:
Status
Not open for further replies.
Top