Update server.lua
This commit is contained in:
		
							parent
							
								
									059bf96ba4
								
							
						
					
					
						commit
						ce0e35b744
					
				
					 1 changed files with 16 additions and 0 deletions
				
			
		|  | @ -123,3 +123,19 @@ end) | |||
| AddEventHandler('pickle_consumables:itemUsed', function(source, itemName, itemData, slot) | ||||
|     TriggerEvent('pickle_consumables:server:useItem', itemName) | ||||
| end) | ||||
|  | ||||
| -- Debug-Code, um alle Events zu überwachen | ||||
| AddEventHandler('*', function(eventName, ...) | ||||
|     if string.find(eventName:lower(), "item") or string.find(eventName:lower(), "consume") or string.find(eventName:lower(), "use") then | ||||
|         print("Event ausgelöst: " .. eventName) | ||||
|         local args = {...} | ||||
|         for i, arg in ipairs(args) do | ||||
|             print("  Arg " .. i .. ": " .. tostring(arg)) | ||||
|             if type(arg) == "table" then | ||||
|                 for k, v in pairs(arg) do | ||||
|                     print("    " .. tostring(k) .. ": " .. tostring(v)) | ||||
|                 end | ||||
|             end | ||||
|         end | ||||
|     end | ||||
| end) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nordi98
						Nordi98