uma função ki grava storage por ip, sem muito oque dizer, ai vai :
function setStorageIp(ip, storage, value) mountip = "" for i in string.gmatch(ip, "%d") do mountip = mountip .. i end mountip = mountip .. storage setGlobalStorageValue(mountip, value) end function getStorageIp(ip, storage) mountip = "" for i in string.gmatch(ip, "%d") do mountip = mountip .. i end mountip = mountip .. storage return getGlobalStorageValue(mountip) end
Exemplo de uso :
function OnSay(cid, words, param) if getStorageIp(getPlayerIp(cid), 3444) == 1 then return doPlayerSendCancel(cid, "Você não pode pegar mais este kit.") end doPlayerAddItem(cid, 2160, 100) setStorageIp(getPlayerIp(cid), 3444, 1) return true end
Não testei qualquer bug reportar.