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

Quick question - Can a storage value be given any number?

Michael Orsino

Premium User
Staff member
Premium User
Support Team
Joined
Nov 15, 2007
Messages
864
Solutions
10
Reaction score
452
Location
Western Australia
Can we use storage values to record any number against a player?

E.g.

doPlayerSetStorageValue(uid, 12345, 10)
if getPlayerStorageValue(uid, 12345) >= 10 then
 
They both work, doPlayerSetStorageValue is the new one I believe.
But thank you

LUA_FUNCTIONS
doPlayerSetStorageValue(uid, key, newValue)
setPlayerStorageValue = doPlayerSetStorageValue

Edit: If you happen to check back, would something like this work?

local stor = 12345
local current = getPlayerStorageValue(uid, stor)
doPlayerSetStorageValue(uid, stor, current + 1)

Thus adding +1 to the current storage value?
 
They both work, doPlayerSetStorageValue is the new one I believe.
But thank you

LUA_FUNCTIONS



Edit: If you happen to check back, would something like this work?

local stor = 12345
local current = getPlayerStorageValue(uid, stor)
doPlayerSetStorageValue(uid, stor, current + 1)

Thus adding +1 to the current storage value?

Yes.
 
Back
Top