mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
keep input
This commit is contained in:
1 parent
b14562eb9d
commit
1c69cd5e2e
3 files changed
+39
-2
No files matched your search
+32
@@ -0,0 +1,32 @@
|
|||||||
|
isPhoneOpen = false
|
||||||
|
|
||||||
|
CreateThread(function()
|
||||||
|
while true do
|
||||||
|
Wait(5)
|
||||||
|
if isPhoneOpen then
|
||||||
|
DisableControlAction(0, 1, true) -- Look Left/Right
|
||||||
|
DisableControlAction(0, 2, true) -- Look up/Down
|
||||||
|
DisableControlAction(0, 16, true) -- Next Weapon
|
||||||
|
DisableControlAction(0, 17, true) -- Select Previous Weapon
|
||||||
|
DisableControlAction(0, 22, true) -- Jump
|
||||||
|
DisableControlAction(0, 24, true) -- Attack
|
||||||
|
DisableControlAction(0, 25, true) -- Aim
|
||||||
|
DisableControlAction(0, 37, true) -- Weapon Wheel
|
||||||
|
else
|
||||||
|
EnableControlAction(0, 1, true) -- Look Left/Right
|
||||||
|
EnableControlAction(0, 2, true) -- Look up/Down
|
||||||
|
EnableControlAction(0, 17, true) -- Select Previous Weapon
|
||||||
|
EnableControlAction(0, 22, true) -- Jump
|
||||||
|
EnableControlAction(0, 24, true) -- Attack
|
||||||
|
EnableControlAction(0, 25, true) -- Aim
|
||||||
|
EnableControlAction(0, 37, true) -- Weapon Wheel
|
||||||
|
EnableControlAction(0, 16, true) -- Next Weapon
|
||||||
|
Wait(1000)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
RegisterNetEvent('npwd:disableEnableInput')
|
||||||
|
AddEventHandler('npwd:disableEnableInput', function()
|
||||||
|
isPhoneOpen = not isPhoneOpen
|
||||||
|
end)
|
||||||
+3
-2
@@ -3,8 +3,9 @@ game "gta5"
|
|||||||
description 'js runtime monkaW'
|
description 'js runtime monkaW'
|
||||||
authors { "itschip", "erik-sn", "TasoOneAsia", "kidz", "RockySouthpaw"}
|
authors { "itschip", "erik-sn", "TasoOneAsia", "kidz", "RockySouthpaw"}
|
||||||
|
|
||||||
client_script {
|
client_scripts {
|
||||||
'resources/dist/client/*.client.js'
|
'resources/dist/client/*.client.js',
|
||||||
|
'futile.lua'
|
||||||
}
|
}
|
||||||
|
|
||||||
server_script {
|
server_script {
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ const showPhone = async (): Promise<void> => {
|
|||||||
sendMessage('PHONE', PhoneEvents.SET_VISIBILITY, true);
|
sendMessage('PHONE', PhoneEvents.SET_VISIBILITY, true);
|
||||||
sendMessage('PHONE', PhoneEvents.SET_TIME, time);
|
sendMessage('PHONE', PhoneEvents.SET_TIME, time);
|
||||||
SetNuiFocus(true, true);
|
SetNuiFocus(true, true);
|
||||||
|
SetNuiFocusKeepInput(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const hidePhone = async (): Promise<void> => {
|
const hidePhone = async (): Promise<void> => {
|
||||||
@@ -65,6 +66,7 @@ const hidePhone = async (): Promise<void> => {
|
|||||||
sendMessage('PHONE', PhoneEvents.SET_VISIBILITY, false);
|
sendMessage('PHONE', PhoneEvents.SET_VISIBILITY, false);
|
||||||
await phoneCloseAnim();
|
await phoneCloseAnim();
|
||||||
SetNuiFocus(false, false);
|
SetNuiFocus(false, false);
|
||||||
|
SetNuiFocusKeepInput(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* * * * * * * * * * * * *
|
/* * * * * * * * * * * * *
|
||||||
@@ -104,8 +106,10 @@ async function Phone(): Promise<void> {
|
|||||||
}
|
}
|
||||||
if (isPhoneOpen) {
|
if (isPhoneOpen) {
|
||||||
await hidePhone();
|
await hidePhone();
|
||||||
|
emit('npwd:disableEnableInput');
|
||||||
} else {
|
} else {
|
||||||
await showPhone();
|
await showPhone();
|
||||||
|
emit('npwd:disableEnableInput');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user