My /serversave command has recently stopped working.. MAYBE at the same as a recent revision update.. was there any code changes to anything related to data saving???.. (no errors are thrown in the Console.. but no serversave happens)
savePlayers() has been changed to saveData()
local savingEvent = 0
local savingDelay = 0
function onSay(cid, words, param)
if getPlayerAccess(cid) ~= 0 then
if param == "" then
saveData()
elseif isNumber(param) == TRUE then
stopEvent(savingEvent)
savingDelay = param * 1000 * 60
save()
end
end
end
function save()
savingEvent = addEvent(save, savingDelay, {})
saveData()
end
function onSay(cid, words, param)
if getPlayerAccess(cid) ~= 0 then
saveData()
print(">>Server manually saved by a GM<<")
doPlayerSendTextMessage(cid, 22, "Server Save Completed")
end
end
function onSay(cid, words, param)
if getPlayerAccess(cid) ~= 0 then
saveData()
end
end
function onSay(cid)
if (getPlayerGroupId(cid) >= 3) then
saveData()
doPlayerSendTextMessage(cid, 24, "Global save complete")
print("Server Save... [done]")
else
doPlayerSendCancel(cid, "You can not execute this command.")
end
end
saveDelay = 1 * 60 * 1000 -- 10 minutes for each save.
storageValue = 2342
if (getGlobalStorageValue(storageValue) == -1) then
function save(saveDelay)
saveData()
print("Server Save..Done.")
addEvent(save, saveDelay, saveDelay)
end
addEvent(save, saveDelay, saveDelay)
setGlobalStorageValue(storageValue, 1)
end