local tableLetter = {
{'2134', '2135', '2136', '2137', '2138'},
{['2134'] = '2129', ['2135'] = '2130', ['2136'] = '2131', ['2137'] = '2132', ['2138'] = '2133'},
{['Los Santos'] = '2139', ['San Fiero'] = '2140', ['Las Venturas'] = '2141', ['Fort Carson'] = '2142',
['El Quebrados'] = '2143', ['Palomino Creek'] = '2144', ['BlueBerry'] = '2145', ['Dillimore'] = '2146'}
}
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('letter', function() -- авто отправка писем
letter = not letter
sampAddChatMessage('Авто-отправка писем '..(letter and 'включена' or 'выключена'), -1)
end)
sampRegisterChatCommand('pie', function() -- готовка пирога
pie = not pie
sampAddChatMessage('Авто-готовка пирога '..(pie and 'включена' or 'выключена'), -1)
end)
sampRegisterChatCommand('wings', function() -- крафт крыльев
wings = not wings
sampAddChatMessage('Авто-крафт крыльев '..(wings and 'включена' or 'выключен'), -1)
end)
sampRegisterChatCommand('psing', function() -- покраска надписи
psing = not psing
sampAddChatMessage('Авто-покраска надписи '..(psing and 'включена' or 'выключена'), -1)
end)
while true do wait(0)
if letter then
for _, id in ipairs(tableLetter[1]) do
if sampTextdrawIsExists(id) then
sampSendClickTextdraw(id)
wait(500)
sampSendClickTextdraw(tableLetter[3][sampTextdrawGetString(tableLetter[2][id])], -1)
wait(500)
end
end
end
if pie then
for i = 2000, 2200 do
if sampTextdrawIsExists(i) then
local box, color, x, y = sampTextdrawGetBoxEnabledColorAndSize(i)
if box == 0 and color == 2155905152 and (x == 22 or x == 37) and (y == 8 or y == 43) then
sampSendClickTextdraw(i)
wait(150)
end
end
end
end
if wings then
for i = 2000, 2200 do
if sampTextdrawIsExists(i) then
local box, color, x, y = sampTextdrawGetBoxEnabledColorAndSize(i)
if box == 0 and color == 2155905152 and x == 29 and y == 34 then
sampSendClickTextdraw(i)
wait(150)
end
end
end
end
if psing then
for i = 2000, 2200 do
if sampTextdrawIsExists(i) then
local box, color, x, y = sampTextdrawGetBoxEnabledColorAndSize(i)
if box == 0 and color == 2155905152 and x == 24 and y == 27 then
sampSendClickTextdraw(i)
wait(150)
end
end
end
end
end
end