script_name("DELSCREEN")
script_version("1.0")
script_author("rubbishman")
script_description("Введи /delsc, чтобы удалить последний скрин.")
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("delsc", delsc)
while true do
wait(100)
text, co, color = sampGetChatString(99)
if string.find(text, 'sa-mp', 1, true) and (string.find(text, 'taken', 1, true) or string.find(text, 'елан', 1, true)) then
f1 = string.find(text, "sa", 1)
f2 = string.find(text, "g", 1)
screennomer = string.sub(text, f1, f2)
end
end
end
function delsc()
if screennomer ~= nil then
os.remove(os.getenv('USERPROFILE') .. "/Documents/GTA San Andreas User Files/SAMP/screens/"..screennomer)
sampAddChatMessage("Screenshot Deleted - "..screennomer, 0x829c5d)
screennomer = nil
addOneOffSound(0.0, 0.0, 0.0, 1139)
end
end