Help Me!!

Recommended Posts

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)
		outputChatBox('You have received your daily reward of $'..newMoney..' enjoy!',source,0,255,255)

			daily[serial] = false

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 by ShayF
  • Thanks 1

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.