MP menu works finally

This commit is contained in:
Pao
2023-01-12 17:16:44 +01:00
parent c049defe9d
commit 76c6f2f6db
3 changed files with 17 additions and 11 deletions

View File

@@ -7,15 +7,16 @@ local function OnTocServerCommand(module, command, args)
if command == 'GivePlayerData' then
--local surgeon = getPlayerByOnlineID(args[1])
local surgeon_id = args[1]
local patient = getPlayer()
local surgeon_id = args[1]
local patient = getPlayerByOnlineID(args[2])
local toc_data = patient:getModData().TOC
-- todo maybe we cant send a table like this. Let's try something easier
--local moneyAmount = playerTwo:getInventory():getCountTypeRecurse("Money")
print("Giving info")
sendClientCommand(patient, "TOC", "SendPlayerData", {surgeon_id, 69})
sendClientCommand(patient, "TOC", "SendPlayerData", {surgeon_id, toc_data})
elseif command == 'SendTocData' then
print("Sending TOC data")