roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,210
- Solutions
- 35
- Reaction score
- 206
Hi, im using tfs 1.2... how can i do that?
i need if player have storageActive with activeValue = 1, then register event.
i need if player have storageActive with activeValue = 1, then register event.
Code:
local events = {
["ratkill"] = {storActive = 100, activeValue = 1},
["rotwormkill"] = {storActive = 120, activeValue = 1},
["scarabkill"] = {storActive = 150, activeValue = 1}
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
for i = 1, #events do
if player:getStorageValue(storActive,activeValue) == 1 then -- I THINK ERROR IS HERE
player:registerEvent(events[i])
end
end
end
Last edited: