Witam, chcia?bym zrobi? u siebie na serwerze avatary pod scoreboardem kt?re s? pobierane z discorda i zeby kazdy gracz ma inny avatar
Wszystko podpi?te ale gdy wchodze do scoreboarda to u kazdego gracza mam tylko sw?j avatar.
M?g?by mi kto? pom?c w przekszta?ceniu kodu tak, ?eby pobiera? on ka?dego gracza a nie tylko siebie?
Kod od strony SERVERA:
[code]function pobierz(plr)
if not getElementData(plr,"player:logged") then
link = exports["DB2"]:pobierzWyniki("SELECT * FROM discord_connect WHERE serial=?",getPlayerSerial(plr))
if not link then return end
fetchRemote(""..link.avatarurl.."",zwrot, "",false,plr)
elseif getElementData(plr,"player:logged") == true then
link1 = exports["DB2"]:pobierzWyniki("SELECT * FROM discord_connect WHERE sid=?",getElementData(plr,"player:sid"))
if not link1 then triggerClientEvent(plr,"onClientGotImage",resourceRoot,nil) return end
fetchRemote(""..link1.avatarurl.."",zwrot, "",false,plr)
end
end
function zwrot(zdjencie, err, plr)
if err == 0 then
triggerClientEvent(plr,"onClientGotImage",resourceRoot,zdjencie)
end
end