mirror of
https://github.com/Michatec/ptelevision.git
synced 2026-04-01 07:56:29 +02:00
Update cursor.lua
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
local scale = 1.5
|
local scale = 1.5
|
||||||
local screenWidth = math.floor(1920 / scale)
|
local screenWidth = math.floor(1920 / scale)
|
||||||
local screenHeight = math.floor(1080 / scale)
|
local screenHeight = math.floor(1080 / scale)
|
||||||
shouldDraw = false
|
local shouldDraw = false
|
||||||
|
|
||||||
function SetInteractScreen(bool)
|
function SetInteractScreen(bool)
|
||||||
if (not shouldDraw and bool) then
|
if (not shouldDraw and bool) then
|
||||||
@@ -19,7 +19,7 @@ function SetInteractScreen(bool)
|
|||||||
local minY, maxY = ((h - (h / 2)) / 2), (h - (h / 4))
|
local minY, maxY = ((h - (h / 2)) / 2), (h - (h / 4))
|
||||||
local totalY = minY - maxY
|
local totalY = minY - maxY
|
||||||
|
|
||||||
RequestTextureDictionary('fib_pc')
|
lib.requestStreamedTextureDict('fib_pc')
|
||||||
|
|
||||||
-- Update controls while active
|
-- Update controls while active
|
||||||
while shouldDraw do
|
while shouldDraw do
|
||||||
@@ -27,7 +27,7 @@ function SetInteractScreen(bool)
|
|||||||
nY = GetControlNormal(0, 240) * screenHeight
|
nY = GetControlNormal(0, 240) * screenHeight
|
||||||
DisableControlAction(0, 1, true) -- Disable looking horizontally
|
DisableControlAction(0, 1, true) -- Disable looking horizontally
|
||||||
DisableControlAction(0, 2, true) -- Disable looking vertically
|
DisableControlAction(0, 2, true) -- Disable looking vertically
|
||||||
DisablePlayerFiring(PlayerPedId(), true) -- Disable weapon firing
|
DisablePlayerFiring(cache.ped, true) -- Disable weapon firing
|
||||||
DisableControlAction(0, 142, true) -- Disable aiming
|
DisableControlAction(0, 142, true) -- Disable aiming
|
||||||
DisableControlAction(0, 106, true) -- Disable in-game mouse controls
|
DisableControlAction(0, 106, true) -- Disable in-game mouse controls
|
||||||
-- Update mouse position when changed
|
-- Update mouse position when changed
|
||||||
|
|||||||
Reference in New Issue
Block a user