Help Auto respon chat

PatriotJGRP

New member
Joined
Jan 26, 2025
Messages
1
Reaction score
0
sa-mp-055.png
I need an auto response if there is a chat "Use '/accept taxi [random code in chat]". and it will automatically type /accept taxi [random code]. im using samp 0.3.7 R1, i've tried to create the script myself, but it doesn't work properly.
 

eaxiess.

Active member
Joined
Jul 30, 2018
Messages
66
Reaction score
14
Location
NOLIFE
@PatriotJGRP
JSON:
function sampev.onServerMessage(color, msg_text)
    local pattern = "Use '/accept taxi (%d+)' to accept the taxi order!"
    local code = string.match(msg_text, pattern)
    
    if code then
        sampSendChat("/accept taxi " .. code)
    end
end
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,321
Solutions
7
Reaction score
939
Location
Lithuania
@PatriotJGRP
JSON:
function sampev.onServerMessage(color, msg_text)
    local pattern = "Use '/accept taxi (%d+)' to accept the taxi order!"
    local code = string.match(msg_text, pattern)
   
    if code then
        sampSendChat("/accept taxi " .. code)
    end
end
i was thinking to make cleo ver, but since you made no need.
good job btw.
 
Top