Conversation
|
@copilot After your last fix attempt this happens: |
…tion and DOM readiness Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
The log you shared only shows the resource starting but doesn't show what happens when you press F9. Could you please share a log that includes pressing F9 to open the tablet? With my fix, you should see additional debug messages like "NUI focus enabled, sending openTablet message" and "openTablet message sent to NUI" after pressing F9. Also, please confirm that |
|
@copilot In the users representation he presses the button and the animation (without the prop- weirdly enough) plays and the tablet does not open |
… NUI messages Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
I've simplified the JavaScript message handling in commit 685a1bf. The DOM readiness queue I added previously may have been interfering with message processing. The code now directly processes incoming messages without queuing, similar to the original behavior but with the framework detection fix still in place on the Lua side. Please have the user test again and share the debug logs (with |
|
@copilot This is the users config: Config = {} -- Framework-Erkennung (erkennt automatisch QBCore oder ESX) Config.Framework = 'esx' -- 'auto', 'qbcore', oder 'esx' -- IntraRP Link Config.IntraURL = 'XXX/enotf/' -- URL mit Direkt-Link zum eNOTF-Protokoll einfügen (z.B. https://deine-url.de/enotf/) -- Debug mode Config.Debug = true -- Zulässige Jobs für Tablet-Zugriff Config.AllowedJobs = { 'police', 'ambulance', 'firedepartment', 'admin' } Config.RequireItem = false Config.RequiredItem = "tablet" -- Taste zum Öffnen des Tablets Config.OpenKey = 'F9' -- Sie können dies in eine beliebige Taste aus der folgenden Liste ändern. -- EmergencyDispatch Sync Einstellungen Config.EMDSync = { Enabled = false, -- Auf true setzen, um die EMD-Synchronisierung zu aktivieren. PHPEndpoint = 'XXX/api/emd-sync.php', -- URL mit Direkt-Link zum EMD-Sync einfügen (z.B. https://deine-url.de/api/emd-sync.php) APIKey = XXX', -- Setze hier den API-Key deines intraRP (du findest diesen unter /assets/config/config.php) SyncInterval = 30000 -- Synchronisations-Intervall (Standard: 30000 = 30 Sekunden) } -- Animation settings Config.Animation = { dict = "amb@world_human_seat_wall_tablet@female@base", anim = "base", flag = 49 } -- Prop settings Config.UseProp = true Config.Prop = { model = "notfpad", bone = 18905, offset = { x = 0.1240, y = 0.0550, z = 0.1550, xRot = -76.0, yRot = -186.0, zRot = 58.3 } } --[[ DO NOT TOUCH ANYTHING BELOW THIS LINE OR YOU WILL BREAK THE SCRIPT // KEINE ÄNDERUNGEN UNTERHALB DIESER ZEILE VORNEHMEN, DA SONST DAS SKRIPT BESCHÄDIGT WIRD ]]-- Config.KeyControls = { -- Function Keys ['F1'] = 288, ['F2'] = 289, ['F3'] = 170, ['F4'] = 167, ['F5'] = 166, ['F6'] = 167, ['F7'] = 168, ['F8'] = 169, ['F9'] = 56, ['F10'] = 57, ['F11'] = 344, ['F12'] = 199, -- Number Keys ['1'] = 157, ['2'] = 158, ['3'] = 160, ['4'] = 164, ['5'] = 165, ['6'] = 159, ['7'] = 161, ['8'] = 162, ['9'] = 163, ['0'] = 84, -- Letter Keys ['A'] = 34, ['B'] = 29, ['C'] = 26, ['D'] = 9, ['E'] = 38, ['F'] = 23, ['G'] = 47, ['H'] = 74, ['I'] = 73, ['J'] = 311, ['K'] = 311, ['L'] = 182, ... (138 Zeilen verbleibend) |
The config looks correct with
Could you ask the user to press F9 and share those specific log lines? This will help identify exactly where in the code flow the issue occurs. |
|
@copilot [ 422] [ DumpServer] 13304/ DumpServer is active and waiting. |
This log shows the FiveM client startup but doesn't include any intraTab-related messages. I need logs from after the user joins the server, sees "tablet resource started" and "Client framework detected: esx", and then presses F9. Look for lines containing "intraTab", "tablet command executed", "Opening Tablet", or "openTablet" to find the relevant section of the log. |
|
@copilot Weil der Prop nicht geladen wird könnte ein Fehler in der fxmanifest vorliegen. Und wieso könnte das Problem unter ESX auftreten? Am Script selbst wurde nicht viel verändert und auf dem Testserver funktioniert es (ohne die Änderungen) mit QBCore ganz problemfrei |
My changes didn't modify the fxmanifest or prop loading code. The Regarding ESX vs QBCore: My changes only added a To isolate whether my changes caused the issue, the user could test:
Without debug logs showing what happens when F9 is pressed, I cannot determine if my framework detection fix is causing the issue or if there's a pre-existing problem. |
Pressing F9 plays the tablet animation but the NUI never appears. The root cause was a race condition where the user could press F9 before the framework detection thread completed, causing
GetPlayerCharacterData()to return nil.Lua (main.lua)
frameworkDetectedflag set after async detection completesJavaScript (script.js)
Simplified message handling to directly process incoming NUI messages
Added null/type validation for incoming message data
Fixes Tablet öffnet nicht #12
Original prompt
This section details on the original issue you should resolve
<issue_title>Tablet öffnet nicht</issue_title>
<issue_description>Ein User meldet, dass sich beim Drücken von F9 zwar die Animation abspielt, aber das Tablet sich nicht öffnet:
[ 1939266] [ GTAProcess] MainThrd/ Got character data: {"lastName":"Test","cid":"char1:7514f0fbe36f7f4f1e7ff50f98dde40105694838","firstName":"Test","job":"police"}
[ 1939266] [ GTAProcess] MainThrd/ Playing tablet animation: amb@world_human_seat_wall_tablet@female@base base
[ 2049109] [ GTAProcess] MainThrd/ tablet command executed
[ 2049109] [ GTAProcess] MainThrd/ Tablet already open
[ 2075656] [ GTAProcess] MainThrd/ Stopped tablet animation
[ 2075672] [ GTAProcess] MainThrd/ removing DLC_ITYP_REQUEST resources:/intraTab/stream/notfpad.ytyp.
[ 2075687] [ GTAProcess] MainThrd/ done removing resources:/intraTab/stream/notfpad.ytyp in data file mounter 00007ffd53212c58.
[ 2075797] [ GTAProcess] MainThrd/ OnConnectionProgress: Downloading content manifest...
[ 2075859] [ GTAProcess] UV loop: httpClient/ Required resources: intraTab
[ 2075891] [ GTAProcess] MainThrd/ Creating script environments for intraTab
[ 2075906] [ GTAProcess] MainThrd/ Loading mounted data files (total: 1)
[ 2075906] [ GTAProcess] MainThrd/ loading DLC_ITYP_REQUEST resources:/intraTab/stream/notfpad.ytyp.
[ 2075906] [ GTAProcess] MainThrd/ done loading resources:/intraTab/stream/notfpad.ytyp in data file mounter 00007ffd53212c58.
[ 2075906] [ GTAProcess] MainThrd/ tablet resource started
[ 2075906] [ GTAProcess] MainThrd/ Framework: None
[ 2075906] [ GTAProcess] MainThrd/ Configured key: F9 Control ID: 56
[ 2075906] [ GTAProcess] MainThrd/ OnConnectionProgress: Mounted intraTab (1 of 1)
[ 2075906] [ GTAProcess] MainThrd/ ^2[intraTab]^7 Client framework detected: esx
[ 2075906] [ GTAProcess] MainThrd/ Monitoring key: F9 with control ID: 56
[ 2089984] [ GTAProcess] MainThrd/ removing DLC_ITYP_REQUEST resources:/intraTab/stream/notfpad.ytyp.
[ 2090016] [ GTAProcess] MainThrd/ done removing resources:/intraTab/stream/notfpad.ytyp in data file mounter 00007ffd53212c58.
[ 2090016] [ GTAProcess] MainThrd/ OnConnectionProgress: Downloading content manifest...
[ 2090109] [ GTAProcess] UV loop: httpClient/ Required resources: intraTab
[ 2090141] [ GTAProcess] MainThrd/ Creating script environments for intraTab
[ 2090141] [ GTAProcess] MainThrd/ Loading mounted data files (total: 1)
[ 2090141] [ GTAProcess] MainThrd/ loading DLC_ITYP_REQUEST resources:/intraTab/stream/notfpad.ytyp.
[ 2090156] [ GTAProcess] MainThrd/ done loading resources:/intraTab/stream/notfpad.ytyp in data file mounter 00007ffd53212c58.
[ 2090156] [ GTAProcess] MainThrd/ tablet resource started
[ 2090156] [ GTAProcess] MainThrd/ Framework: None
[ 2090156] [ GTAProcess] MainThrd/ Configured key: F9 Control ID: 56
[ 2090156] [ GTAProcess] MainThrd/ ^2[intraTab]^7 Client framework detected: esx
[ 2090156] [ GTAProcess] MainThrd/ Monitoring key: F9 with control ID: 56
[ 2090156] [ GTAProcess] MainThrd/ OnConnectionProgress: Mounted intraTab (1 of 1)
[ 2093578] [ GTAProcess] MainThrd/ tablet command executed
[ 2093578] [ GTAProcess] MainThrd/ Opening Tablet...
[ 2093578] [ GTAProcess] MainThrd/ ESX data found: {"job":{"grade_name":"officer","label":"LSPD","name":"police","grade_label":"Officer","grade":1,"type":"leo","onDuty":true,"skin_male":[],"skin_female":[],"grade_salary":40},"dateofbirth":"01/01/2000","sex":"m","weight":0,"dead":false,"maxWeight":24,"inventory":[{"usable":true,"weight":2,"label":"Bandage","canRemove":1,"name":"bandage","count":0,"rare":0},{"usable":true,"weight":2,"label":"Blowtorch","canRemove":1,"name":"blowpipe","count":0,"rare":0},{"usable":true,"weight":3,"label":"Body Kit","canRemove":1,"name":"carokit","count":0,"rare":0},{"usable":true,"weight":1,"label":"Bread","canRemove":1,"name":"bread","count":0,"rare":0},{"usable":false,"weight":3,"label":"Cannabis","canRemove":1,"name":"cannabis","count":0,"rare":0},{"usable":false,"weight":1,"label":"Chicken fillet","canRemove":1,"name":"packaged_chicken","count":0,"rare":0},{"usable":false,"weight":1,"label":"Cloth","canRemove":1,"name":"clothe","count":0,"rare":0},{"usable":false,"weight":1,"label":"Copper","canRemove":1,"name":"copper","count":0,"rare":0},{"usable":false,"weight":1,"label":"Cut wood","canRemove":1,"name":"cutted_wood","count":0,"rare":0},{"usable":false,"weight"...
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.