Fala ai galera, vim trazer outro script, então vamos a ele.
-
Serve para o player ter acesso a alguma coisa por certo tempo, o player compra o acesso por uma quantia estipulada no script.
/data/talkactions/scripts/newfile.lua
DfujTzXB[/pastebin]
talkactions.xml
<talkaction words = "!buyacess" event = "script" value = "newfile.lua"/>
Para checar se a pessoa tem acesso.
To check if the person has access, you use: if(getPlayerStorageValue(cid, 83922) - os.time() > 0) then.
Para checar quantos dias de acesso a pessoa ainda tem.
To check how many days the person still has access, you use: os.date("%d %B %Y %X", getPlayerStorageValue(cid, 83922)).
Exemplo.
Example:
function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, 83922) - os.time() > 0) then return doTeleportThing(cid, toPosition) end return doPlayerSendCancel(cid, "Sorry, you do not have access to it.") end
Como usar.
How to use:
!buyacess 20.
É isso ai, espero que gostem.