> For the complete documentation index, see [llms.txt](https://rrp-scripts.gitbook.io/rrpscripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rrp-scripts.gitbook.io/rrpscripts/scripts/qb_realistic_atm/install-guide/change-ratios.md).

# Change Ratios

If you need to adjust the ratios for different ATM models due to changes in camera angles or other reasons, follow these steps

1. **Use the Following Code to Get Ratios**:\
   \- Add this code to a client script to help you get the ratios:<br>

   ```lua
   Citizen.CreateThread(function()
               while true do
               Citizen.Wait(0)
               local cursorX, cursorY = GetNuiCursorPosition()
               local resX, resY = GetActualScreenResolution()
               local ratioX = cursorX / resX
               local ratioY = cursorY / resY
               exports['qb-core']:DrawText(('%s - %s'):format(ratioX, ratioY), 0.5)
               if IsControlPressed(0, 38) then -- E key
                   print(ratioX, ratioY)
                   Wait(300)
               end
           end
   end)
   ```
2. **Determine the Coordinates**:\
   \- Move your mouse to the top-left corner of the area you want to select and press the `E` key to log the coordinates.\
   \- Move your mouse to the bottom-right corner of the area you want to select and press the `E` key again to log the coordinates.
3. **Update the Config File**:\
   \- Use the logged coordinates to update the [config.lua](vscode-file://vscode-app/c:/Users/erik3/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) file with the new ratios. Each button or area should have its `x`, `y`, `x2`, and `y2` values updated accordingly.
4. **Example**:\
   \- If you logged the coordinates `(0.33860938383267, 0.33575129533679)` for the top-left corner and `(0.36630864895421, 0.36683937823834)` for the bottom-right corner, update the corresponding entry in [config.lua](vscode-file://vscode-app/c:/Users/erik3/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html):
