• 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!

Character Save Problem!!

valivan601

New Member
Joined
Apr 13, 2011
Messages
365
Reaction score
1
im using this to save players but it only save the players position anyone know how to add players items to this save?

Code:
function onThink(cid, interval) 
    for _, cid in ipairs(getPlayersOnline()) do 
        doPlayerSave(cid, true) 
        return true 
    end 
end
 
Last edited:
dude.. any error in console?
try changed function Onthink.. Not works, looking console for take me error..
Lua:
function onThink(interval, lastExecution, thinkInterval) 
    for _, cid in ipairs(getPlayersOnline()) do 
        doPlayerSave(cid, true) 
        return true 
    end 
end
 
[Erro - GlovalEvents::think] Couldn't exucute event: savecharacter

this error appers when there is noone player online
only one line of error?

i see one mistake:
Lua:
function onThink(interval, lastExecution, thinkInterval) 
    if(#getPlayersOnline() < 1)then return TRUE end
    for _, cid in ipairs(getPlayersOnline()) do 
        doPlayerSave(cid, true) 
    end 
    return true 
end
in first loop function returns value and script has executed.
 
Last edited:
Back
Top