• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Mały problem z Exphist

Maloria

Się gra się ma ;pp
Joined
Jul 20, 2009
Messages
111
Reaction score
0
mam problem moje statystki na stronie nie pokazują wbitego expa w 1 dzień w 2 itd
Maloria - Exhist
Co mam zrobić? coś źle? jest czy coń
 
function onLogin(cid)
if(InitHistory == 0) then
local historyPage = addEvent(historyPage, 60000, {})
InitHistory = historyPage
end
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "BountyHunter")


return TRUE
end

function historyPage(parameters)
local historyPage = addEvent(historyPage, 60000, {})
if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23456)) then
setGlobalStorageValue(23456, (tonumber(os.date("%d"))))
db.executeQuery("UPDATE `players` SET `onlinetime7`=players.onlinetime6, `onlinetime6`=players.onlinetime5, `onlinetime5`=players.onlinetime4, `onlinetime4`=players.onlinetime3, `onlinetime3`=players.onlinetime2, `onlinetime2`=players.onlinetime1, `onlinetime1`=players.onlinetimetoday, `onlinetimetoday`=0;")
db.executeQuery("UPDATE `players` SET `exphist7`=players.exphist6, `exphist6`=players.exphist5, `exphist5`=players.exphist4, `exphist4`=players.exphist3, `exphist3`=players.exphist2, `exphist2`=players.exphist1, `exphist1`=players.experience-players.exphist_lastexp, `exphist_lastexp`=players.experience;")
end
db.executeQuery("UPDATE `players` SET `onlinetimetoday`=players.onlinetimetoday+60, `onlinetimeall`=players.onlinetimeall+60 WHERE `online` = 1;")
end
Co o tym sądzicie?
 
historyPage
function onLogin(cid)
if(InitHistory == 0) then
local historyPage = addEvent(historyPage, 60000, {})
InitHistory = historyPage
end
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "BountyHunter")


return TRUE
end

function historyPage(parameters)
local historyPage = addEvent(historyPage, 60000, {})
if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23456)) then
setGlobalStorageValue(23456, (tonumber(os.date("%d"))))
db.executeQuery("UPDATE `players` SET `onlinetime7`=players.onlinetime6, `onlinetime6`=players.onlinetime5, `onlinetime5`=players.onlinetime4, `onlinetime4`=players.onlinetime3, `onlinetime3`=players.onlinetime2, `onlinetime2`=players.onlinetime1, `onlinetime1`=players.onlinetimetoday, `onlinetimetoday`=0;")
db.executeQuery("UPDATE `players` SET `exphist7`=players.exphist6, `exphist6`=players.exphist5, `exphist5`=players.exphist4, `exphist4`=players.exphist3, `exphist3`=players.exphist2, `exphist2`=players.exphist1, `exphist1`=players.experience-players.exphist_lastexp, `exphist_lastexp`=players.experience;")
end
db.executeQuery("UPDATE `players` SET `onlinetimetoday`=players.onlinetimetoday+60, `onlinetimeall`=players.onlinetimeall+60 WHERE `online` = 1;")
end

O to ci chodzi?
 
nie o to
Code:
function historyPage(parameters)
local historyPage = addEvent(historyPage, 60000, {})
if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23456)) then
setGlobalStorageValue(23456, (tonumber(os.date("%d"))))
db.executeQuery("UPDATE `players` SET `onlinetime7`=players.onlinetime6, `onlinetime6`=players.onlinetime5, `onlinetime5`=players.onlinetime4, `onlinetime4`=players.onlinetime3, `onlinetime3`=players.onlinetime2, `onlinetime2`=players.onlinetime1, `onlinetime1`=players.onlinetimetoday, `onlinetimetoday`=0;")
db.executeQuery("UPDATE `players` SET `exphist7`=players.exphist6, `exphist6`=players.exphist5, `exphist5`=players.exphist4, `exphist4`=players.exphist3, `exphist3`=players.exphist2, `exphist2`=players.exphist1, `exphist1`=players.experience-players.exphist_lastexp, `exphist_lastexp`=players.experience;")
end
db.executeQuery("UPDATE `players` SET `onlinetimetoday`=players.onlinetimetoday+60, `onlinetimeall`=players.onlinetimeall+60 WHERE `online` = 1;")
end
function onLogin(cid)
if(InitHistory == 0) then
local historyPage = addEvent(historyPage, 60000, {})
InitHistory = historyPage
end
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "BountyHunter")


return TRUE
end
dodales w global.lua InitHistory = 0 ??
 
Back
Top