• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Talkaction (!check) and check the storage/value

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,210
Solutions
35
Reaction score
207
I need a script to check the storage (10200) and value.
When i say !check, display on my screen the name of players who have the storage and the value of storage.
Exemple:
zzzzzzzzzzz.png
I have this script, catch the Storage and Set player name:
function onSay(cid, words, param)
local query, msg = db.getResult("SELECT name FROM players WHERE id IN (SELECT player_id FROM player_storage WHERE key = 10200);"), ""
if (query:getID() ~= -1) then
while (true) do
local name = query:getDataString("name")
msg = msg..name.."\n"
if not(query:next()) then
break
end
end
else
return doShowTextDialog(cid, param, "Nobody.")
end
return doShowTextDialog(cid, param, msg) and true
end
Name we have the players who have storage (10200)
value we have the value of his storages

edit: the script check all storage (OFFline e ONline players)
 
Last edited:
Back
Top