huh, still not working for me,
Actiond Id on the hole 34908Code:local config = { storage = 1343, key_id = 2090 -- Key ID } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, config.storage) == -1 then setPlayerStorageValue(cid, config.storage, 1) key = doPlayerAddItem(cid, config.key_id, 1) doSetItemActionId(key, 3244) else doPlayerSendCancel(cid, "You have already received this key.") end end
PHP:<action actionid="34908" event="script" value="fibula.lua" />
local config = {
storage = 1343,
key_id = 2090 -- Key ID
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, config.storage) == -1 then
setPlayerStorageValue(cid, config.storage, 1)
key = doPlayerAddItem(cid, config.key_id, 1)
doSetItemActionId(key, 3244)
else
doPlayerSendCancel(cid, "You have already received this key.")
end
end
<action uniqueid="1000" event="script" value="script.lua"/>
doSetItemActionId(key, 3244)