BrunoV20 0 Posted October 24, 2017 I would like to know how I do that by itself such a day goes in gives something to the user! Share this post Link to post
Callum 26 Posted October 24, 2017 (edited) As a basic outline, you will want to make use of timers, and (I'd imagine) givePlayerMoney. Edited October 24, 2017 by Callum Share this post Link to post
BrunoV20 0 Posted October 24, 2017 I am saying how I do so that for every day that logee on the server gives them something Share this post Link to post
Pollo 53 Posted October 25, 2017 (edited) local daily = {} addEventHandler('onPlayerLogin',resourceRoot,function runEvent() local serial = getPlayerSerial(source) if not daily[serial] then daily[serial] = false end if daily[serial] == false then daily[serial] = true local newMoney = math.random(1000) setPlayerMoney(source,getPlayerMoney(source)+newMoney) outputChatBox('You have received your daily reward of $'..newMoney..' enjoy!',source,0,255,255) setTimer(function() daily[serial] = false end,86400000,1) end end) 86,400,000 is milliseconds, it represents a day. 1 second = 1,000 milliseconds 1 minute = 60 seconds 1 hour = 60 minutes 1 day = 24 hours 1,000*60*60*24 = 86,400,000 Edited October 25, 2017 by ShayF 1 Share this post Link to post