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

Lua Help with function

Gothric

New Member
Joined
Feb 6, 2010
Messages
264
Reaction score
1
What function should i Use for set storage value of all players to the same??

for example
doSetPlayerStorageValue(cid, 2323, 2323) but for all players xD
 
if you want to set it for all online players:
Code:
for _, pl in pairs(getPlayersOnline()) do
     doSetPlayerStorageValue(pl,2323,2323)
end

however, if you want everyone to have that storage value, you'll have to edit login.lua to check if their storage value is -1 and if it is then set as 2323
(or, of course, edit the database, but i'm not so good with mysql scripts)
 
well the only true way would be to set it on login.lua
personally I can't see the point in setting everyone's storage for that to 2323 when by default any unused player storage values are -1, so if you needed to check if they've done something etc just check for -1 instead of 2323
 
Back
Top