server side:
function onPlayerLogin(_,acc)
if getPlayerAccount(acc) then
for i = 1, #coords do
for j = 1, 3 do
if getAccountData(source, "timeTrial"..i.."-"..j) ~= nil then
triggerClientEvent(source, "accountDatasFromServer", source, getAccountData(source, "timeTrial"..i.."-"..j), i)
else
triggerClientEvent(source, "accountDatasFromServer", source, "-", i)
end
end
end
end
end
addEventHandler("onPlayerLogin", root, onPlayerLogin)
Client side:
function accountDatasFrom(data, i)
accountDatas[i] = {data1, data2, data3}
end
addEvent("accountDatasFromServer", true)
addEventHandler("accountDatasFromServer", root, accountDatasFrom)
dxDrawText(accountDatas[id][1], sx/2 - 120, sy/2 - 126, _, _, tocolor(255,255,255,255), 0.65, font, "center", _, false, false, false, true)
My problem: I would like to be able to use the matrix sent from the server side on the client side.
I am currently still learning this feature, that's why I contacted you.