Guiaki
Member
- Joined
- Jan 3, 2011
- Messages
- 137
- Reaction score
- 8
Hey, I wanted to make a script that will give you points daily, which function can I use? that when a player log in 24hours after he received the first points of that day he earns more points, or every midnight everyone is credited 15 points dunno, how can i do it? please I need it the faster the best! i'll rep++
I was thinking in something like this:
I was thinking in something like this:
Code:
local points = getPlayerStorageValue(cid, 880010)
function onMidnight(cid)
if os.date("%X") == "00:00:00" then
for i,1 #db.execute ("SELECT * FROM TABLE PLAYERS WHERE ID MAX") do // I DON't know how to make scripts in MySQL
if points <= 15 then
setPlayerStorageValue(cid, 880010, 15)
end
end
end
end
Last edited by a moderator: