function scanFiles(path, type)
local TEMP = {}
local search, file = findFirstFile(path.."\\"..type)
local count = 0
if file ~= '.' and file ~= '..' then table.insert(TEMP, file) end
while file do
count = count+1
file = findNextFile(search)
if file ~= '.' and file ~= '..' then table.insert(TEMP, file) end
end
return TEMP
end
function getLastScreenName()
local screens = scanFiles(getFolderPath(5) .. '\\GTA San Andreas User Files\\SAMP\\screens', '*.png')
return screens[#screens] or 'blyat, vse poshlo po pizde'
end