Category:FitScreen

From Multi Theft Auto: Wiki
Revision as of 09:26, 20 May 2020 by Deiwn. (talk | contribs) (Created page with "function fitScreen(resolution, position, selected) width, height = guiGetScreenSize() if resolution and position and selected then if type(resolution) == "numb...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

function fitScreen(resolution, position, selected)

   width, height = guiGetScreenSize()
   if resolution and position and selected then
       if type(resolution) == "number" and type(position) == "number" and type(selected) == "string" then
           if selected == "height" or selected == "width" then
               return tonumber(_G[selected])*(position/resolution)
           end
       end
   end
   return nil

end

This category currently contains no pages or media.