Decent60
My peanut
- Joined
- Feb 28, 2008
- Messages
- 99
- Reaction score
- 0
I was trying to do a quest where I could use a lever once per 24 hours, using the getPlayerStorage command but I kinda ran into a problem with it, I got so far as the lever will stop after the first pulled but I can't figure out how to make it work after 24 hours have passed, this is what I have so far:
Would placing this after that in the same lua make it work?
So it would look like this:
I don't have it set up completely on my server yet so I haven't tested this, I just wondered if that would make it work.
[Edit]
Actually I know I should have wrote [Help] instead of [Request], slight problem of waking up and trying to think xD
Code:
if item.uid == [Your Unique ID here] then
if getPlayerStorageValue(cid,1234561) == -1 then
setPlayerStorageValue(cid,1234561,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Your Congraz Words here.')
addEvent(onTime,1440*60*1000,a)
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Your Denial Words Here.')
end
Would placing this after that in the same lua make it work?
Code:
function onTime(a)
setPlayerStorageValue(cid,1234561,-1)
[end]
So it would look like this:
Code:
if item.uid == [Your Unique ID here] then
if getPlayerStorageValue(cid,1234561) == -1 then
setPlayerStorageValue(cid,1234561,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Your Congraz Words here.')
addEvent(onTime,1440*60*1000,a)
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Your Denial Words Here.')
end
function onTime(a)
setPlayerStorageValue(cid,1234561,-1)
[end]
[Edit]
Actually I know I should have wrote [Help] instead of [Request], slight problem of waking up and trying to think xD
Last edited: