Category:FitScreen: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "function fitScreen(resolution, position, selected) width, height = guiGetScreenSize() if resolution and position and selected then if type(resolution) == "numb...")
(No difference)

Revision as of 09:26, 20 May 2020

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.