Вы используете устаревший браузер. Этот и другие сайты могут отображаться в нём некорректно. Вам необходимо обновить браузер или попробовать использовать другой.
Hello there everyone, I have been trying to make a script that autotypes a reaction for me.
For example, The server will show the following message:
First one to type DxG56(this one is random) gets money.
So, I want the script to find "DxG56" and send it. I tried this but it didn't work:
It's...
Can you make string.find absolute? For example, I want it to find "Meth" ONLY, If I use find.string it finds "Methmanol" too for example, any word that has "Meth" will be found, how to disable that?
function main()
if not isSampLoaded() and isSampAvailable() then return end
while not isSampAvailable() do wait(0) end
sampAddChatMessage("AutoDrugs (/adrugs)", -1)
sampRegisterChatCommand("adrugs", activate)
wait(-1)
end
function activate()
Activate = not Activate...
function q.onServerMessage(color, str)
if str:find("You have cooked 10 grams of crack.") then
wait(100)
sampSendChat("/usedrug crack 5")
end
end
I get this error when I use it
DrugWork: C:\GTA San Andreas\moonloader\DrugWork.lua:111: attempt to yield across C-call boundary
stack traceback...
I want to read the 2 next lines from a file when I find a specific string. Here is my code:
for line in file:lines() do
if string.find(line, string) then
var1 = file:read("*line")
var2= ??????????????
end
end
How to get the var2...
I want to read the 2 next lines from a file when I find a specific string. Here is my code:
for line in file:lines() do
if string.find(line, string) then
var1 = file:read("*line")
var2= ??????????????
end
end
How to get the var2...
sampRegisterChatCommand("locate", function(find)
local filefind = io.open("moonloader/locations.txt", "r")
for line in filefind:lines() do
if string.find(line, find) then
coords = filefind:read("*line")
local posx, posy, posz =...
sampRegisterChatCommand("locate", function(findlocation)
local coords = nil
local file = io.open("moonloader/savedlocs.txt", "r")
for line in file:lines() do
if string.find(line, findlocation) then
coords = file:read("*line")...