Jump to content

طلب شرح فكشن


Recommended Posts

السلام عليكم 

ابي شرح لفكشن getRealTime()

لاني ابي اسوي مود مثلا الساعة 8 الصباح

يشغل اذكار الصباح 

يعني انا شفت الويكي

بس ابي كود مثلا يتاكد انو الريل تايم = 8 صباح

عشان يشغل الدعاء

وبس

 

Edited by ABoHussin
Link to comment
time = getRealTime()
sec , min, hour = time.second, time.minute, time.hour
setTimer(function()
if hour == 8 then
outputChatBox("الأذكار", root, 255, 255, 0, true)
end
end)
لو تباها 8  بليل يبقا تتحقق ان الساعة 
20 و هيك

 

Link to comment
5 hours ago, x1AhMeD,-09 said:

time = getRealTime()
sec , min, hour = time.second, time.minute, time.hour
setTimer(function()
if hour == 8 then
outputChatBox("الأذكار", root, 255, 255, 0, true)
end
end)
لو تباها 8  بليل يبقا تتحقق ان الساعة 
20 و هيك

 

شكرا اخوي بس عادي استخدم

and min == 30 

?

Link to comment

Client :

 

function aCallAzkar (	)
	local aTime = getRealTime ( )
	local aHour = aTime.hour
	local aMinute = aTime.minute
		if ( aHour == 08 and aMinute == 30 ) then
			removeEventHandler ( 'onClientRender',root,aCallAzkar )
				playSound( string soundPath, [ bool looped = false ] )
		end
	end
addEventHandler ( 'onClientRender',root,aCallAzkar );

 

Edited by FaHaD
Mistake
  • Like 2
Link to comment
2 hours ago, FaHaD said:

Client :

 


function aCallAzkar (	)
	local aTime = getRealTime ( )
	local aHour = aTime.hour
	local aMinute = aTime.minute
		if ( aHour == 08 and aMinute == 30 ) then
			removeEventHandler ( 'onClientRender',root,aCallAzkar )
				playSound( string soundPath, [ bool looped = false ] )
		end
	end
addEventHandler ( 'onClientRender',root,aCallAzkar );

Thanks ,, 

تسلم يالامير ،، <3

 

Link to comment

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.
×
×
  • Create New...