justboy Posted December 1, 2014 Share Posted December 1, 2014 (edited) السلام عليكم ورحة الله وبركاته local Count = getPlayerCount ( )/ 2 local mapName = getMapName() local CountCommand = 0 local i = CountCommand + 0+0 addEvent("onMapStarting", true) addEventHandler("onMapStarting", root, function ( ) for _,v in ipairs(getElementsByType("player")) do setElementData ( v, "voteRedo", false ) end end) addCommandHandler("vr", function(source) if i == math.ceil(Count) then return end if getElementData ( source, "voteRedo" ) == true then return end setElementData (source, "voteRedo", true) i = i+1 outputChatBox("#629632[VoteRedo]#FFFFFF["..i.."/"..math.ceil(Count).."]",root,225,225,225,true) if i == math.ceil(Count) then outputChatBox("#629632[VoteRedo]#FFFFFFMap Will Be restarted",root ,5,5,5,true) i = i - math.ceil(Count) exports.mapmanager:changeGamemodeMap(mapName) end end) DeBug:- 'mapmanger_exports.lua:64: mapmanger : lnvalid map specified' & المود مايحط الماب وهذ الخطأ أللي يطلع بـ الدي بق ^ Edited December 19, 2014 by Guest Link to comment
TAPL Posted December 1, 2014 Share Posted December 1, 2014 بأسم الماب string يعطي نص getMapName بينما فنكشن resource يتطلب المنت changeGamemodeMap فنكشن getRunningGamemodeMap استخدم عشان تجيب اسم الماب الحالي Link to comment
justboy Posted December 1, 2014 Author Share Posted December 1, 2014 (edited) بأسم الماب string يعطي نص getMapName بينما فنكشن resource يتطلب المنت changeGamemodeMap فنكشنgetRunningGamemodeMap استخدم عشان تجيب اسم الماب الحالي مشكور اشتغل edit: يعيال المشكلة يعيد الماب علطول انا ابيه اول مايخلص الماب او اللاعبين كلهم يموتوا ممكن الفكشنات او الطريقة Edited December 2, 2014 by Guest Link to comment
Bassam*Syria Posted December 1, 2014 Share Posted December 1, 2014 انت ضايف المود لجروب الادمن ؟ Group : Admin (Acl admin ) Link to comment
justboy Posted December 2, 2014 Author Share Posted December 2, 2014 انت ضايف المود لجروب الادمن ؟Group : Admin (Acl admin ) يب اكيد انت مو فاهمني بالظبط انا ابي فنكشن لما الماب يخلص او ...او.. ـ يسوي اعادة للماب Link to comment
ALw7sH Posted December 2, 2014 Share Posted December 2, 2014 ذولي : local Count = getPlayerCount ( )/ 2 local mapName = getMapName() local CountCommand = 0 local i = CountCommand + 0+0 لازم يتحدثون كل ماب edit : عشان انه يعيد الماب على طول انت مخلي لو وصل الفوت للي تبيه ع طول يعيد الماب خل اكواد اعادة الماب معى ايفنت مثلاً onRaceStateChanging or onPlayerRaceWasted Link to comment
justboy Posted December 19, 2014 Author Share Posted December 19, 2014 local Count = getPlayerCount ( )/ 2 local mapName = exports.mapmanager:getRunningGamemodeMap() local CountCommand = 0 local i = CountCommand + 0+0 addEventHandler("onResourceStart",resourceRoot, function() setElementData (root, "JB", true ) end) addEvent("onRaceStateChanging", true) addEventHandler("onRaceStateChanging", getRootElement(), function(newState, oldState) if(newState == "Running")then for _,v in ipairs(getElementsByType("player")) do setElementData ( v, "voteRedo", false ) end end end) addEvent("onRaceStateChanging", true) addEventHandler("onRaceStateChanging",root, function(newState, oldState) for _,v in ipairs(getElementsByType("player")) do if newState == "LoadingMap" then setElementData(v ,"mapLo",false) elseif newState == "Running" then setElementData(v ,"mapLo",true) end end end) addCommandHandler("vr", function(source) if getElementData ( source, "mapLo" ) == false then return outputChatBox("#629632[VoteRedo]#FFFFFFWait for start map",source,225,225,225,true) end if i == math.ceil(Count) then return outputChatBox("#629632[VoteRedo]#FFFFFFMap Will Be restarted",source,225,225,225,true) end if getElementData ( source, "voteRedo" ) == true then return outputChatBox("#629632[VoteRedo]#FFFFFFYou Already Vote",source,225,225,225,true) end if getElementData ( source, "JB" ) == false then return outputChatBox("#629632[VoteRedo]#FFFFFFU can't",source,225,225,225,true) end setElementData (source, "voteRedo", true) i = i+1 outputChatBox("#629632[VoteRedo]#FFFFFF"..getPlayerName(source).."#FFFFFF Has Voted For redo #629632["..i.."/"..math.ceil(Count).."]",root,225,225,225,true) if i == math.ceil(Count) then outputChatBox("#629632[VoteRedo]#FFFFFFMap Will Be restarted",root ,5,5,5,true) end end) addEvent("onRaceStateChanging", true) addEventHandler("onRaceStateChanging", root, function(newState, oldState) if i == math.ceil(Count) then if(newState == "PostFinish")then exports.mapmanager:changeGamemodeMap(mapName) if (exports.mapmanager:changeGamemodeMap(mapName)) then setElementData (root, "JB", false ) outputChatBox("#629632[VoteRedo]#FFFFFFMap Has Been Restarted",root ,5,5,5,true) i = i - i end end end end) addEvent("onRaceStateChanging", true) addEventHandler("onRaceStateChanging", root, function(newState, oldState) if(newState == "PostFinish")then if getElementData (root, "JB" ) == false then if (newState == "Running" ) then removeElementData(root,"JB") end end end end) هو الماب مايتكرر مرتين JB ابي اذا بدا ماب جديد على الالمنت داتا false or true او ينحذف يصير الاخطاء في التحققات ادري مافهمتوا شيء جربوا المود عشان تفهموا ان شاء الله تجربوه في ماب بدون ريسباون عشا ن يشتغل Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now