Witam tworze serwer dayz i nie mam poj?cia jak zapisywa? wszystkie kille gracza. Bo kille na jednym zyciu gracza (czyli np je?eli gracz nie zgin?? to pokazuje ile ma killi a ja chc? ?eby one si? zapisywa?y i pokazywa?y ??cznie ile ich jest) si? wy?wietlaj?.
Prosze pom??cie
To co wyswietla kille na jednym zyciu to "murders"
Stawiam piwko osobie kt?ra pomo?e mi to zrobi?
Ref
Ostatnio zmieniony przez Ognisty_12877 2018-07-06, 18:49, w całości zmieniany 2 razy
Mam to zrobione tak i dlaej nie dzia?a a nie umiem niestety zapisac tego do mysql. Co w takiej sytuacji mam zrobic ? Chyba ?e kto? wie i napisze mi Funkcje
addEventHandler ( "onPlayerWasted", root,function( totalAmmo, killer, killerWeapon, bodypart, stealth )
if killer then
local account = getPlayerAccount (killer)
if killer ~= source then
local data = getAccountData(account,"totalkillsdeaths.Kills")
if data then
setAccountData(account,"totalkillsdeaths.Kills",data+1)
else
setAccountData(account,"totalkillsdeaths.Kills",1)
end
end
end
end)
addEventHandler( "onPlayerLogin",root,function( thePreviousAccount, theCurrentAccount, autoLogin )
local account = getPlayerAccount ( source )
local data = getAccountData( account,"totalkillsdeaths.Kills" )
if not data then
setAccountData( account,"totalkillsdeaths.Kills",0 )
else
setAccountData( account,"totalkillsdeaths.Kills",data)
end
end)
[ Dodano: 2018-07-05, 17:53 ]
a zeby wyswietlic to mam to
{ name = "Wszystkie zab?jstwa", width = 100, data = function (element) return ( getAccountData ( element, "totalkillsdeaths.Kills" ) or 0 ) end },
[ Dodano: 2018-07-05, 18:14 ]
piwerko juz dosta?es za pomoc thx
[ Dodano: 2018-07-05, 18:18 ]
tylko dalej nie wiem o jaka funkcjie ci chodzi
mam takie cos
scoreboardColumns = {
{ name = "Gracze", width = 200, data = function (element) return getPlayerName ( element ) end },
{ name = "Zab?jstwa", width = 100, data = function (element) return ( getElementData ( element, "murders" ) or 0 ) end },
{ name = "Wszystkie zab?jstwa", width = 100, data = function (element) return ( getElementData ( element, "totalkillsdeaths.Kills" ) or 0 ) end },
{ name = "Zgony", width = 80, data = function (element) return getElementData ( element, "Deaths" ) or 0 end },
{ name = "Zabite Zombie", width = 80, data = function (element) return ( getElementData ( element, "zombieskilled" ) or 0 ) end },
{ name = "Czas ?ycia", width = 80, data = function (element) return formatTimeFromMinutes(getElementData ( element, "alivetime" ) or 1 ) end },
--{ name = "Онлайн", width = 80, data = function (element) return getElementData ( element, "playersTable" ) or 10 end },
--{ name = "Pieni?dze", width = 80, data = function (element) return getElementData ( element, "Pieni?dze" ) or 0 end },
{ name = "Grupa", width = 150, data = function (element) return ( getElementData ( element, "gang" ) or "Brak" ) end },
--{ name = "KDr", width = 80, data = function (element) return getElementData ( element, "Ratio" ) or 0 end },
}
function Sprawdzenie (playersource,command,reason)
if (isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(playersource)), aclGetGroup("Admin"))) then
for i, player in ipairs(getElementsByType("player")) do
outputChatBox("cos"(getAccountData(element, "totalkillsdeaths.Kills")), player, 255, 255, 255, true)
end
end
end
addCommandHandler("sprawdzenie",Sprawdzenie)
[ Dodano: 2018-07-05, 19:02 ]
Mo?e tu gdzie? jest b??d bo dalej te kille nie dzia?aj? a jak robi? t? funkcji? na chat to mam b??dy. Nie wyczymie no
local sw, sh = guiGetScreenSize()
scoreboardColumns = {
{ name = "Gracze", width = 200, data = function (element) return getPlayerName ( element ) end },
{ name = "Zab?jstwa", width = 100, data = function (element) return ( getElementData ( element, "murders" ) or 0 ) end },
{ name = "Wszystkie zab?jstwa", width = 100, data = function (element) return ( getElementData ( element, "totalkillsdeaths.Kills" ) or 0 ) end },
{ name = "Zgony", width = 80, data = function (element) return getElementData ( element, "Deaths" ) or 0 end },
{ name = "Zabite Zombie", width = 80, data = function (element) return ( getElementData ( element, "zombieskilled" ) or 0 ) end },
{ name = "Czas ?ycia", width = 80, data = function (element) return formatTimeFromMinutes(getElementData ( element, "alivetime" ) or 1 ) end },
--{ name = "Онлайн", width = 80, data = function (element) return getElementData ( element, "playersTable" ) or 10 end },
--{ name = "Pieni?dze", width = 80, data = function (element) return getElementData ( element, "Pieni?dze" ) or 0 end },
{ name = "Grupa", width = 150, data = function (element) return ( getElementData ( element, "gang" ) or "Brak" ) end },
--{ name = "KDr", width = 80, data = function (element) return getElementData ( element, "Ratio" ) or 0 end },
}
addEventHandler ( "onPlayerWasted", root,function( totalAmmo, killer, killerWeapon, bodypart, stealth )
if killer then
local account = getPlayerAccount (killer)
if killer ~= source then
local data = getAccountData(account,"totalkillsdeaths.Kills")
if data then
setAccountData(account,"totalkillsdeaths.Kills",data+1)
else
setAccountData(account,"totalkillsdeaths.Kills",1)
end
end
end
end)
addEventHandler( "onPlayerLogin",root,function( thePreviousAccount, theCurrentAccount, autoLogin )
local account = getPlayerAccount ( source )
local data = getAccountData( account,"totalkillsdeaths.Kills" )
if not data then
setAccountData( account,"totalkillsdeaths.Kills",0 )
else
setAccountData( account,"totalkillsdeaths.Kills",data)
end
end)
function Sprawdzenie ()
sprawdze = getElementData("totalkillsdeaths.Kills")
outputChatBox("cos: "..sprawdze, 255, 200, 155)
end
addCommandHandler("sprawdz",Sprawdzenie)
[ Dodano: 2018-07-05, 19:07 ]
Jak co? moge wys?ac co chcesz ?eby to zrobi?
function Sprawdzenie(plr,cmd)
local account = getPlayerAccount(plr)
local data = getAccountData(account, "totalkillsdeaths.Kills") or "a jednak nie ma..."
for i, v in ipairs(getElementsByType("player")) do
outputChatBox(data,v)
end
end
addCommandHandler("sprawdzenie",Sprawdzenie)
i napisz co wysz?o. Nwm jak ty ale ja nie widz? event?w kiedy gracz wyjdzie z serwera albo zostanie skrypt zatrzymany. Popraw to i dodaj komend? gdzie dajesz sobie na kille albo dedy no albo dalej tam zabijaj pedy czy co ty tam robisz
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