local storage = 19012
for _, pid in ipairs(getPlayersOnline()) do
if getPlayerStorageValue(pid, storage) ~= -1 then
doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "Hey you got the storage.")
end
end
local storage, count = 19012, 0
for _, pid in ipairs(getPlayersOnline()) do
if getPlayerStorageValue(pid, storage) ~= -1 and pid ~= cid then
count = count+1
end
end
if count == 0 then
doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "Only you have the storage, executing script.")
else
doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "There are another player with the storage, sorry.")
end
LUA:local storage, count = 19012, 0 for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, storage) ~= -1 and pid ~= cid then count = count+1 end end if count == 0 then doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "Only you have the storage, executing script.") else doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "There are another player with the storage, sorry.") end
Remenber to rep+ ^^
Ops, little mistake.
Just change the pid outside the loop to cid.
@teck
I do what i want, care about ur own life.
Yes, you gave a good advice, but i was talking about