Jump to content

طلب مود اجرو الدخول


+Hasone_)

Recommended Posts

مرحبا

ممكن مساعدة في عمل مود الوقت لبدء المهمات يعني يطلع وقت يعد تنازلي وبعد ما ينتهي يشغل المهمة وبعدها المهمة الثانية وكذلك 

ارجو المساعدة للذي لديه خبرة لاتبخلو

Link to comment
41 minutes ago, +Hasone_) said:

مرحبا

ممكن مساعدة في عمل مود الوقت لبدء المهمات يعني يطلع وقت يعد تنازلي وبعد ما ينتهي يشغل المهمة وبعدها المهمة الثانية وكذلك 

ارجو المساعدة للذي لديه خبرة لاتبخلو

--C
function ClientExplosionCFunction()
	if getElementDimension(source) == 55 or
	   getElementDimension(source) == 50 or
	   getElementDimension(source) == 999 then
		cancelEvent()
	end
	if getElementData(source,"TurfMission") then
		cancelEvent()
	end
end
addEventHandler("onClientExplosion", root, ClientExplosionCFunction)

addEventHandler("onClientPreRender", root,
function()
	if getElementDimension(localPlayer) == 55 or
	   getElementDimension(localPlayer) == 50 or
	   getElementDimension(localPlayer) == 999 or
	   getElementData(localPlayer,"TurfMission") then
		if getPedWeaponSlot(localPlayer) == 8 then
			setPedWeaponSlot(localPlayer, 0)
		end
	end
end)

--S

--by #GMG
function STARTMissions()
 if not isTimer(startMission1) then
  startMission1 = setTimer(function()
   NameMission() -- مكان الاسم ذا ملف المود حق المهمة
   startMission2 = setTimer(function()
    Name Mission() -- مكان الاسم ذا ملف المود حق المهمة
    startMission3 = setTimer(function()
     Name Mission() -- مكان الاسم ذا ملف المود حق المهمة
		 STARTMissions()
   	        end, 30*60*1000, 1) -- Name Mission
   	       end, 30*60*1000, 1) -- Name Mission
   	      end, 30*60*1000, 1) -- Name Mission
        end, 1000, 1) -- اول مهمة ..
     end
end
addEvent("STARTMissions",true)
addEventHandler("STARTMissions",root,STARTMissions)
addEventHandler("onResourceStart", getResourceRootElement( getThisResource( ) ), STARTMissions)

-----------------------
function NameMission()
	setTimer(function()
		startResource(getResourceFromName ( "NameMission" ))
	end,1000,1)
	stopResource(getResourceFromName ( "NameMission2" ))
	stopResource(getResourceFromName ( "NameMission3" ))
	stopResource(getResourceFromName ( "NameMission4" ))

end
function NameMission2()
	stopResource(getResourceFromName ( "" ))
	setTimer(function()
		startResource(getResourceFromName ( "" ))
	end,1000,1)
	stopResource(getResourceFromName ( "" ))
	stopResource(getResourceFromName ( "" ))
	stopResource(getResourceFromName ( "" ))
end

function M3SniperMission()
	stopResource(getResourceFromName ( "" )) -- توقف اول مهمة اشتغلت
	stopResource(getResourceFromName ( "" )) -- توقف تاني مهمة اشتغلت
	setTimer(function()
		startResource(getResourceFromName ( "M3" )) -- تشغل اسم المهمة الثالثه
	end,1000,1)
	stopResource(getResourceFromName ( "" ))
	stopResource(getResourceFromName ( "" ))
	stopResource(getResourceFromName ( "" ))
end

-----------------------

function getTimeLeft(Timer)
	ms = getTimerDetails(Timer)
	local m = math.floor(ms/60000)
	local s = math.floor((ms-m*60000)/1000)
    	if m < 10 then m = "0"..m end
    	if s < 10 then s = "0"..s end
    	return "("..m..":"..s..")"
end

function MissionsTime(player)
	if isTimer(startMission1) then
		exports["guimessages"]:outputServer(player,"Next Mission : Name1 Mission started after: "..getTimeLeft(startMission1), 0, 255, 255)
	elseif isTimer(startMission2) then
		exports["guimessages"]:outputServer(player,"Next Mission : Name2 Mission started after: "..getTimeLeft(startMission2), 0, 255, 255)
	elseif isTimer(startMission3) then
		exports["guimessages"]:outputServer(player,"Next Mission : Name3 Mission started after: "..getTimeLeft(startMission3), 0, 255, 255)
	end
end
addCommandHandler("times",MissionsTime)
addCommandHandler("MissionsTime",MissionsTime)


local Display = textCreateDisplay()
local NextMission = textCreateTextItem("", 0.11, 0.015, "high", 0, 255, 255, 255, 1, "center", "center", 255)
textDisplayAddText(Display, NextMission)

function MissionsDisplayTime()
	for k,p in ipairs(getElementsByType("player")) do
		textDisplayAddObserver(Display, p)
	end

	setTimer(function()
	if isTimer(startMission1) then
		textItemSetText(NextMission, "Next :MissionName Mission :"..getTimeLeft(startMission1))
	elseif isTimer(startMission2) then
		textItemSetText(NextMission, "Next :MissionName Mission :"..getTimeLeft(startMission2))
	elseif isTimer(startMission3) then
		textItemSetText(NextMission, "Next :MissionName Mission :"..getTimeLeft(startMission3))
	end
	end,1000,0)
end
addEventHandler("onResourceStart", getResourceRootElement( getThisResource( ) ), MissionsDisplayTime)


addEventHandler("onPlayerLogin", root,
function ()
textDisplayAddObserver(Display, source)
end
)

 

Link to comment
10 hours ago, -#GMG said:

--C
function ClientExplosionCFunction()
	if getElementDimension(source) == 55 or
	   getElementDimension(source) == 50 or
	   getElementDimension(source) == 999 then
		cancelEvent()
	end
	if getElementData(source,"TurfMission") then
		cancelEvent()
	end
end
addEventHandler("onClientExplosion", root, ClientExplosionCFunction)

addEventHandler("onClientPreRender", root,
function()
	if getElementDimension(localPlayer) == 55 or
	   getElementDimension(localPlayer) == 50 or
	   getElementDimension(localPlayer) == 999 or
	   getElementData(localPlayer,"TurfMission") then
		if getPedWeaponSlot(localPlayer) == 8 then
			setPedWeaponSlot(localPlayer, 0)
		end
	end
end)

--S

--by #GMG
function STARTMissions()
 if not isTimer(startMission1) then
  startMission1 = setTimer(function()
   NameMission() -- مكان الاسم ذا ملف المود حق المهمة
   startMission2 = setTimer(function()
    Name Mission() -- مكان الاسم ذا ملف المود حق المهمة
    startMission3 = setTimer(function()
     Name Mission() -- مكان الاسم ذا ملف المود حق المهمة
		 STARTMissions()
   	        end, 30*60*1000, 1) -- Name Mission
   	       end, 30*60*1000, 1) -- Name Mission
   	      end, 30*60*1000, 1) -- Name Mission
        end, 1000, 1) -- اول مهمة ..
     end
end
addEvent("STARTMissions",true)
addEventHandler("STARTMissions",root,STARTMissions)
addEventHandler("onResourceStart", getResourceRootElement( getThisResource( ) ), STARTMissions)

-----------------------
function NameMission()
	setTimer(function()
		startResource(getResourceFromName ( "NameMission" ))
	end,1000,1)
	stopResource(getResourceFromName ( "NameMission2" ))
	stopResource(getResourceFromName ( "NameMission3" ))
	stopResource(getResourceFromName ( "NameMission4" ))

end
function NameMission2()
	stopResource(getResourceFromName ( "" ))
	setTimer(function()
		startResource(getResourceFromName ( "" ))
	end,1000,1)
	stopResource(getResourceFromName ( "" ))
	stopResource(getResourceFromName ( "" ))
	stopResource(getResourceFromName ( "" ))
end

function M3SniperMission()
	stopResource(getResourceFromName ( "" )) -- توقف اول مهمة اشتغلت
	stopResource(getResourceFromName ( "" )) -- توقف تاني مهمة اشتغلت
	setTimer(function()
		startResource(getResourceFromName ( "M3" )) -- تشغل اسم المهمة الثالثه
	end,1000,1)
	stopResource(getResourceFromName ( "" ))
	stopResource(getResourceFromName ( "" ))
	stopResource(getResourceFromName ( "" ))
end

-----------------------

function getTimeLeft(Timer)
	ms = getTimerDetails(Timer)
	local m = math.floor(ms/60000)
	local s = math.floor((ms-m*60000)/1000)
    	if m < 10 then m = "0"..m end
    	if s < 10 then s = "0"..s end
    	return "("..m..":"..s..")"
end

function MissionsTime(player)
	if isTimer(startMission1) then
		exports["guimessages"]:outputServer(player,"Next Mission : Name1 Mission started after: "..getTimeLeft(startMission1), 0, 255, 255)
	elseif isTimer(startMission2) then
		exports["guimessages"]:outputServer(player,"Next Mission : Name2 Mission started after: "..getTimeLeft(startMission2), 0, 255, 255)
	elseif isTimer(startMission3) then
		exports["guimessages"]:outputServer(player,"Next Mission : Name3 Mission started after: "..getTimeLeft(startMission3), 0, 255, 255)
	end
end
addCommandHandler("times",MissionsTime)
addCommandHandler("MissionsTime",MissionsTime)


local Display = textCreateDisplay()
local NextMission = textCreateTextItem("", 0.11, 0.015, "high", 0, 255, 255, 255, 1, "center", "center", 255)
textDisplayAddText(Display, NextMission)

function MissionsDisplayTime()
	for k,p in ipairs(getElementsByType("player")) do
		textDisplayAddObserver(Display, p)
	end

	setTimer(function()
	if isTimer(startMission1) then
		textItemSetText(NextMission, "Next :MissionName Mission :"..getTimeLeft(startMission1))
	elseif isTimer(startMission2) then
		textItemSetText(NextMission, "Next :MissionName Mission :"..getTimeLeft(startMission2))
	elseif isTimer(startMission3) then
		textItemSetText(NextMission, "Next :MissionName Mission :"..getTimeLeft(startMission3))
	end
	end,1000,0)
end
addEventHandler("onResourceStart", getResourceRootElement( getThisResource( ) ), MissionsDisplayTime)


addEventHandler("onPlayerLogin", root,
function ()
textDisplayAddObserver(Display, source)
end
)

 

انت كيف عامل ستدعاء للفنكشن وانت اصلاً بافتكشن 

 


--by #GMG
function STARTMissions()
 if not isTimer(startMission1) then
  startMission1 = setTimer(function()
   NameMission() -- مكان الاسم ذا ملف المود حق المهمة
   startMission2 = setTimer(function()
    Name Mission() -- مكان الاسم ذا ملف المود حق المهمة
    startMission3 = setTimer(function()
     Name Mission() -- مكان الاسم ذا ملف المود حق المهمة
		 STARTMissions()
   	        end, 30*60*1000, 1) -- Name Mission
   	       end, 30*60*1000, 1) -- Name Mission
   	      end, 30*60*1000, 1) -- Name Mission
        end, 1000, 1) -- اول مهمة ..
     end
end

واانت تحت حاط


addEvent("STARTMissions",true)
addEventHandler("STARTMissions",root,STARTMissions)
addEventHandler("onResourceStart", getResourceRootElement( getThisResource( ) ), STARTMissions)

فالنفترض انو ركب الاكود ذي على كل المهمات لما يشغل المهمات رح يلاحظ انو كل المهمات تشتغل مع بعض 

فلهذا المفروض يعطل  ال

addEventHandler("onResourceStart", getResourceRootElement( getThisResource( ) ), STARTMissions)

لكل المهمات الى اول مهمة مشان يتنضمن الى في سوا كل المهمات  تشتغل في فنكشن واحد

Link to comment
6 hours ago, iyaad said:

انت كيف عامل ستدعاء للفنكشن وانت اصلاً بافتكشن 

 


--by #GMG
function STARTMissions()
 if not isTimer(startMission1) then
  startMission1 = setTimer(function()
   NameMission() -- مكان الاسم ذا ملف المود حق المهمة
   startMission2 = setTimer(function()
    Name Mission() -- مكان الاسم ذا ملف المود حق المهمة
    startMission3 = setTimer(function()
     Name Mission() -- مكان الاسم ذا ملف المود حق المهمة
		 STARTMissions()
   	        end, 30*60*1000, 1) -- Name Mission
   	       end, 30*60*1000, 1) -- Name Mission
   	      end, 30*60*1000, 1) -- Name Mission
        end, 1000, 1) -- اول مهمة ..
     end
end

واانت تحت حاط


addEvent("STARTMissions",true)
addEventHandler("STARTMissions",root,STARTMissions)
addEventHandler("onResourceStart", getResourceRootElement( getThisResource( ) ), STARTMissions)

فالنفترض انو ركب الاكود ذي على كل المهمات لما يشغل المهمات رح يلاحظ انو كل المهمات تشتغل مع بعض 

فلهذا المفروض يعطل  ال


addEventHandler("onResourceStart", getResourceRootElement( getThisResource( ) ), STARTMissions)

لكل المهمات الى اول مهمة مشان يتنضمن الى في سوا كل المهمات  تشتغل في فنكشن واحد

المود شغال معي

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...