Jump to content

getTime (хэлп)


Recommended Posts

Хочу вызвать функцию между 12.00 и 13.00 игрового времени. В чем ошибка?

client:

addEventHandler ( "onClientResourceStart", resourceRoot,
	function ()
	local h, m = getTime()
	if tonumber(h) >= 12 and tonumber(h) < 13 then
		    create ()
		    outputChatBox( "works", 255, 0, 255 )
	    end
	end 
, false )

 

Link to comment
  • 3 years later...
On 24/12/2018 at 04:45, Markn1 said:

Хочу вызвать функцию между 12.00 и 13.00 игрового времени. В чем ошибка?

client:

addEventHandler ( "onClientResourceStart", resourceRoot,
	function ()
	local h, m = getTime()
	if tonumber(h) >= 12 and tonumber(h) < 13 then
		    create ()
		    outputChatBox( "works", 255, 0, 255 )
	    end
	end 
, false )

 

setTimer (function()
	function ()
	local h, m = getTime()
	if tonumber(h) >= 12 and tonumber(h) < 13 then
		    create ()
		    outputChatBox( "works", 255, 0, 255 )
	    end
	end 
end, 10*1000, 0)

 

Link to comment
  • Scripting Moderators

@AngelAlpha, ?. Не поднимайте старые темы.
Вы можете помочь в решении новых вопросов, где люди всё ещё заинтересованы в этом.

Link to comment
  • Sarrum locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...