Faktycznie, dzieki.
Ale teraz, nick wyskakuje mi normalnie, poprawnie ale mam bledy z loginem i getAccountData
Serverside:
addEvent("listaGraczyTrigger",true)
function listaGraczy()
liczbaOnline = getPlayerCount()
gracze = getElementsByType("player")
for k,v in pairs(gracze) do
gracz = getPlayerName(v)
konto = getPlayerAccount(v)
login = getAccountName(konto)
if getAccountData(konto,"Warny")==nil then
setAccountData(konto,"Warny",0/5)
end
dataW = getAccountData(konto,"Warny")
triggerClientEvent("uzGrTr",root,gracze,gracz,liczbaOnline,k,v,konto,dataW)
end
--triggerClientEvent("uzupelnijGraczyTrigger",root,liczbaOnline,gracze)
end
addEventHandler("listaGraczyTrigger",root,listaGraczy)
Clientside:
local function wlaczGUI()
guiSetVisible(mod.okno, true)
triggerServerEvent("zbanowaniTrigger",root)
triggerServerEvent("listaGraczyTrigger",root)
showCursor(true, true)
end
addCommandHandler("modp",wlaczGUI)
addEvent("uzGrTr",true)
function uzGr(gracze,gracz,liczbaOnline,k,v,konto,login,dataW)
guiGridListAddRow(mod.gracze)
guiGridListSetItemText(mod.gracze,0,k,login,false,false)
guiGridListSetItemText(mod.gracze,1,k,gracz,false,false)
guiGridListSetItemText(mod.gracze,2,k,dataW,false,false)
end
addEventHandler("uzGrTr",root,uzGr,gracze,gracz,liczbaOnline,k,v,konto,login,dataW)
Bad argument @ 'guiGridListSetItemText' [Expected string at argument 4, got boolean]
Bad argument @ 'guiGridListSetItemText' [Expected string at argument 4, got nil]
Nie zwracajcie uwagi na te niepotrzebne zmienne, nie chce mi sie kasowac tego, a kombinowalem z tym troche
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach