local text = "тут твой текст"
function main()
while not isSampAvailable() do wait(0) end
while true do wait(0)
if wasKeyPressed(80) and not sampIsDialogActive() and not sampIsChatInputActive() and not isSampfuncsConsoleActive() then -- бука - "P"
for k, v in ipairs(getAllChars()) do
local res, id = sampGetPlayerIdByCharHandle(v)
if res and isCharInAnyCar(v) then
sampSendChat("/pm "..id.." "..text)
wait(700)
end
end
end
end
wait(-1)
end