Sigoles
Discord: @sigoles
- Joined
- Nov 20, 2015
- Messages
- 1,209
- Solutions
- 2
- Reaction score
- 154
This script is showing all the messages, even if not having the storage, the correct one would be to show the messages only of those that we have globalstorage.
tfs 1.2
tfs 1.2
LUA:
local strings = {
[1] = {storage = 100, text = "TESTE 1."}, -- Fury Gates
[2] = {storage = 63321, text = "TESTE 2."}, -- nightmare isle
[3] = {storage = 63322, text = "TESTE 3."}, -- Chyllfroest
[4] = {storage = 63323, text = "TESTE 4."},
[5] = {storage = 63324, text = "TESTE 5."},
[6] = {storage = 1290121, text = "TESTE 6."},
}
function onUse(cid, item, fromPosition, target, toPosition, isHotkey)
local player = Player(cid)
local name = player:getName()
for i = 1, #strings do
local t = strings[i]
if getGlobalStorageValue(t.storage) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, t.text)
end
end
return true
end