#Basel Posted January 7, 2017 Share Posted January 7, 2017 مطلوب مود ديربي بماركر وشكرا Link to comment
Abu-Solo Posted January 7, 2017 Share Posted January 7, 2017 تبيه اول ما يخش الماركر يدخله الديربي؟ وش رأيك آصبلك قهوة بعد ع الاقل حاول انك تسويه. ترا سهل وما يحتاج شئ Link to comment
MR.Mosa Posted January 7, 2017 Share Posted January 7, 2017 4 hours ago, Abu-Solo said: تبيه اول ما يخش الماركر يدخله الديربي؟ وش رأيك آصبلك قهوة بعد ع الاقل حاول انك تسويه. ترا سهل وما يحتاج شئ اسمع على فكرة انت اول ما دخلت كنت تطلب كذا اشياء فش داعي تتكلم معاه كذا واذا ما بدك تساعده فش داعي تزود مشاركات 3 Link to comment
#Basel Posted January 7, 2017 Author Share Posted January 7, 2017 (edited) up up up # بنسبه لمحاولتي ما في , لاني تركت البرمجه من زمن الى بقدر يعطيني المود بكون متشكرهـ . Edited January 7, 2017 by #Basel Link to comment
Abu-Solo Posted January 8, 2017 Share Posted January 8, 2017 15 hours ago, MR.Mosa said: اسمع على فكرة انت اول ما دخلت كنت تطلب كذا اشياء فش داعي تتكلم معاه كذا واذا ما بدك تساعده فش داعي تزود مشاركات وش فيك زعلان اتكلم براحتي . وانت لا تزود مشاركات ع الفاضي ! شكلك كاتب ذي عشان تزود الله يهديك Link to comment
MR.Mosa Posted January 8, 2017 Share Posted January 8, 2017 1 hour ago, Abu-Solo said: وش فيك زعلان اتكلم براحتي . وانت لا تزود مشاركات ع الفاضي ! شكلك كاتب ذي عشان تزود الله يهديك حب انا ما يهمني المشاركات لنها ما رح تفيديني ولا رح تجيني رتبه من ورها ومش على راحتك تتكلم احترم الناس عشان نحترمك وبس 1 Link to comment
#STZ Posted January 8, 2017 Share Posted January 8, 2017 Mkn = createMarker(2926.50049, -1760.15784, 15.90000, "arrow", 1.1, 255, 0, 0, 170 ) addEventHandler('onMarkerHit', Mkn, function(element) if getElementType(element) == 'player' and checkDuel(element) == "prestart" and ( not checkExistPlrOnDuel(element) ) then online = countPlayersOnDerby() if tonumber(online) +1 < 32 then setData(element,"onCrossMap","yes") outputChatBox("الرجاء الانتظار ..",element,255,255,0,true) setD(element) spawnOnMap(element) else outputChatBox(" لم يبق مكان بالديـربي الرجآء, الانتظآر الديربي القآدم,",element,0,255,0,true) end end end) Link to comment
Abu-Solo Posted January 8, 2017 Share Posted January 8, 2017 41 minutes ago, MR.Mosa said: حب انا ما يهمني المشاركات لنها ما رح تفيديني ولا رح تجيني رتبه من ورها ومش على راحتك تتكلم احترم الناس عشان نحترمك وبس الحين الكلام بيني وبينه !...! انت وش اللي دخلك في السالفه ! هو متقبل المزح هذا واذا هو صديقي وامزح معه وش اللي حشرك في السالفه ع العموم ... يعطيك العافية Link to comment
#Basel Posted January 8, 2017 Author Share Posted January 8, 2017 ما اشتغل ما يظهر المار كر اساسا الى بقدر يساعدني ويحط المود كامل بكون متشكرهـ # Link to comment
Abu-Solo Posted January 9, 2017 Share Posted January 9, 2017 14 hours ago, #Basel said: ما اشتغل ما يظهر المار كر اساسا الى بقدر يساعدني ويحط المود كامل بكون متشكرهـ # حط الكود فـ المود حق الديربي نفسه ! Link to comment
#Basel Posted January 9, 2017 Author Share Posted January 9, 2017 Server spawns = {} setElementData(resourceRoot,"map","no") setElementData(resourceRoot,"winMoney","0") sfa7DerbyMarker = createMarker(-3580.6833496094,-2693.2133789063,1.3184461593628, "cylinder",1.5, 0, 255, 0 , 255 ) addEventHandler('onMarkerHit', sfa7DerbyMarker, function(element) if getElementType(element) == 'player' and checkDuel(element) == "prestart" and ( not checkExistPlrOnDuel(element) ) then online = countPlayersOnDerby() if tonumber(online) +1 < 32 then setData(element,"onCrossMap","yes") outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD} :الرجاء الانتظار ..",element,255,255,0,true) setD(element) spawnOnMap(element) else outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لم يبق مكان بالديـربي الرجآء, الانتظآر الديربي القآدم,",element,0,255,0,true) end end end) function checkDuel(p) if tostring(getElementData(resourceRoot,"map")) == "yes" then outputChatBox("* #ff0000≈ #ffffff[#ff0000 DerbySystem #ffffff ] #00BCCD≈",p,255,255,0,true) elseif tostring(getElementData(resourceRoot,"map")) == "no" then outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : الرجآء الانتظآر,حتى يبدء الديربي",p,255,255,0,true) if _mytimer and isTimer(_mytimer) then _r,_e,_t = getTimerDetails(_mytimer) if _r and _e and _t then total = _r / 60 / 1000 outputChatBox("تبقـى: "..math.ceil(total)) end end end return tostring(getElementData(resourceRoot,"map")) end function checkExistPlrOnDuel(p) per = getElementData(p,"onCrossMap") if tostring(per) == "yes" then return true else return false end end function setData(element,key,vlr) setElementData(element,key,vlr) end function setD(element) setElementDimension(element,30) end function spawnOnMap(p) count = countPlayersOnDerby() spawned = "no" for i,data in pairs(spawns)do if tonumber(data.id) == tonumber(count) then spawned = "yes" v = createVehicle(411,data.x,data.y,data.z,data.rx,data.ry,data.rz) setElementDimension(v,30) setElementFrozen(v,true) setElementData(v,"creatorDerby","yes") break end end if spawned == "no" then randomS = math.random("1","32") for i,data in pairs(spawns)do if tonumber(data.id) == tonumber(randomS) then v = createVehicle(411,data.x,data.y,data.z,data.rx,data.ry,data.rz) setElementDimension(v,30) setElementFrozen(v,true) setElementData(v,"creatorDerby","yes") break end end end toggleControl(p,"enter_exit", false ) warpPedIntoVehicle(p,v) setCameraTarget(p,p) end function countPlayersOnDerby() c = -1 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 end end return tonumber(c) end function eventCheck () if checkExistPlrOnDuel(source) then toggleControl(source,"enter_exit",true ) setData(source,"onCrossMap","no") checkEnd() end end addEventHandler("onPlayerWasted",getRootElement(), eventCheck) addEventHandler("onPlayerQuit",getRootElement(),eventCheck) addEventHandler("onPlayerJoin",getRootElement(),function() outputChatBox("",source,255,255,0,true) setData(source,"onCrossMap","no") end) for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap","no") end function checkEnd() c = 0 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 winner = p end end if tonumber(c) == 1 then givePlayerMoney(winner,tonumber(getElementData(resourceRoot,"winMoney"))) n = string.gsub(getPlayerName(winner), "#%x%x%x%x%x%x", "") outputChatBox("* #ff0000≈[ #ff0000 " .. n .. " #FF9700 Won the Derby and win#00FF00 " .. tonumber(getElementData(resourceRoot,"winMoney")) .. "$ ##ff0000]≈",getRootElement(),255,255,0,true) setElementData(resourceRoot,"map","no") endDerby() _mytimer = setTimer(newDuel,60*1000*5,1) end end function newDuel() for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap","no") end setElementData(resourceRoot,"map","prestart") outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لدخول الديربي,اكتب في الشـآت ديربي.",getRootElement(),255,255,0,true) RMoney = math.random("50000","300000") setElementData(resourceRoot,"winMoney",tonumber(RMoney)) outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : سيحصل الفآئز في الديربي على #00FF00|" .. RMoney .. "|$",getRootElement(),0,255,0,true) setTimer(checkPlrs,30000,1) end function checkPlrs () c = 0 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 end end if tonumber(c) > 1 then setElementData(resourceRoot,"map","yes") for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then setElementCollisionsEnabled(getPedOccupiedVehicle( p),true) outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لقد بدآء الديربي , يمكنك الانطلاق",p,0,255,0,true) setElementFrozen(getPedOccupiedVehicle(p),false) end end else endDerby() setElementData(resourceRoot,"map","no") outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لم يبدآء الديربي, لعدم توفر الاعبين",getRootElement(),255,255,0,true) _mytimer = setTimer(newDuel,60*1000*5,1) end end _mytimer = setTimer(newDuel,3000,1) function onStartLoadSpawns () file = fileOpen("map.map") localFile = fileOpen("map.xml") fileWrite(localFile,"") data = fileRead(file,999999) fileWrite(localFile,data) fileClose(localFile) xml = xmlLoadFile("map.xml") c = 0 for i,data in pairs(xmlNodeGetChildren(xml)) do if xmlNodeGetName(data) == "spawnpoint" then c = c+1 v,xx,yy,zz,rxx,ryy,rzz = xmlNodeGetAttribute(data,"vehicle"),xmlNodeGetAttribute(data,"posX"),xmlNodeGetAttribute(data,"posY"),xmlNodeGetAttribute(data,"posZ"),xmlNodeGetAttribute(data,"rotX"),xmlNodeGetAttribute(data,"rotY"),xmlNodeGetAttribute(data,"rotZ") table.insert(spawns,{id = c,model = v,x = xx,y = yy,z = zz,rx = rxx,ry = ryy,rz = rzz}) end end for i,data in pairs(xmlNodeGetChildren(xml)) do if xmlNodeGetName(data) == "object" then m,xx,yy,zz,rxx,ryy,rzz = xmlNodeGetAttribute(data,"model"),xmlNodeGetAttribute(data,"posX"),xmlNodeGetAttribute(data,"posY"),xmlNodeGetAttribute(data,"posZ"),xmlNodeGetAttribute(data,"rotX"),xmlNodeGetAttribute(data,"rotY"),xmlNodeGetAttribute(data,"rotZ") object = createObject(m,xx,yy,zz,rxx,ryy,rzz) setElementDimension(object,30) end end end setTimer(onStartLoadSpawns,3000,1) function endDerby() for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then killPed(p) end end for i,v in pairs(getElementsByType("vehicle"))do if getElementData(v,"creatorDerby") then destroyElement(v) end end end setTimer(function() for i,p in pairs(getElementsByType("player"))do sea(p) resetHan(p) checkVeh(p) checkModel(p) end end,1000,0) outputChatBox("",getRootElement(),255,255,0,true) function sea(p) if checkExistPlrOnDuel(p) then x,y,z = getElementPosition(p) if tonumber(z) <= 0 then killPed(p) end end end function checkVeh(p) if (tonumber(getElementDimension(p)) == 30) and not (isPedInVehicle(p))then killPed(p) end end function resetHan(p) if checkExistPlrOnDuel(p) then setVehicleHandling (getPedOccupiedVehicle(p), true ) end end function checkModel(p) if checkExistPlrOnDuel(p) and isPedInVehicle(p) then if tonumber(getElementModel(getPedOccupiedVehicle(p)) ) ~= 411 then killPed(p) end end end client.lua addEventHandler("onClientRender",getRootElement(),function() if tostring(getElementData(getLocalPlayer(),"onCrossMap")) == "yes" then setWorldSpecialPropertyEnabled("aircars", false) setWorldSpecialPropertyEnabled("extrajump", false) setWorldSpecialPropertyEnabled("hovercars", false) end end) Link to comment
Abu-Solo Posted January 10, 2017 Share Posted January 10, 2017 19 hours ago, #Basel said: Server spawns = {} setElementData(resourceRoot,"map","no") setElementData(resourceRoot,"winMoney","0") sfa7DerbyMarker = createMarker(-3580.6833496094,-2693.2133789063,1.3184461593628, "cylinder",1.5, 0, 255, 0 , 255 ) addEventHandler('onMarkerHit', sfa7DerbyMarker, function(element) if getElementType(element) == 'player' and checkDuel(element) == "prestart" and ( not checkExistPlrOnDuel(element) ) then online = countPlayersOnDerby() if tonumber(online) +1 < 32 then setData(element,"onCrossMap","yes") outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD} :الرجاء الانتظار ..",element,255,255,0,true) setD(element) spawnOnMap(element) else outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لم يبق مكان بالديـربي الرجآء, الانتظآر الديربي القآدم,",element,0,255,0,true) end end end) function checkDuel(p) if tostring(getElementData(resourceRoot,"map")) == "yes" then outputChatBox("* #ff0000≈ #ffffff[#ff0000 DerbySystem #ffffff ] #00BCCD≈",p,255,255,0,true) elseif tostring(getElementData(resourceRoot,"map")) == "no" then outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : الرجآء الانتظآر,حتى يبدء الديربي",p,255,255,0,true) if _mytimer and isTimer(_mytimer) then _r,_e,_t = getTimerDetails(_mytimer) if _r and _e and _t then total = _r / 60 / 1000 outputChatBox("تبقـى: "..math.ceil(total)) end end end return tostring(getElementData(resourceRoot,"map")) end function checkExistPlrOnDuel(p) per = getElementData(p,"onCrossMap") if tostring(per) == "yes" then return true else return false end end function setData(element,key,vlr) setElementData(element,key,vlr) end function setD(element) setElementDimension(element,30) end function spawnOnMap(p) count = countPlayersOnDerby() spawned = "no" for i,data in pairs(spawns)do if tonumber(data.id) == tonumber(count) then spawned = "yes" v = createVehicle(411,data.x,data.y,data.z,data.rx,data.ry,data.rz) setElementDimension(v,30) setElementFrozen(v,true) setElementData(v,"creatorDerby","yes") break end end if spawned == "no" then randomS = math.random("1","32") for i,data in pairs(spawns)do if tonumber(data.id) == tonumber(randomS) then v = createVehicle(411,data.x,data.y,data.z,data.rx,data.ry,data.rz) setElementDimension(v,30) setElementFrozen(v,true) setElementData(v,"creatorDerby","yes") break end end end toggleControl(p,"enter_exit", false ) warpPedIntoVehicle(p,v) setCameraTarget(p,p) end function countPlayersOnDerby() c = -1 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 end end return tonumber(c) end function eventCheck () if checkExistPlrOnDuel(source) then toggleControl(source,"enter_exit",true ) setData(source,"onCrossMap","no") checkEnd() end end addEventHandler("onPlayerWasted",getRootElement(), eventCheck) addEventHandler("onPlayerQuit",getRootElement(),eventCheck) addEventHandler("onPlayerJoin",getRootElement(),function() outputChatBox("",source,255,255,0,true) setData(source,"onCrossMap","no") end) for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap","no") end function checkEnd() c = 0 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 winner = p end end if tonumber(c) == 1 then givePlayerMoney(winner,tonumber(getElementData(resourceRoot,"winMoney"))) n = string.gsub(getPlayerName(winner), "#%x%x%x%x%x%x", "") outputChatBox("* #ff0000≈[ #ff0000 " .. n .. " #FF9700 Won the Derby and win#00FF00 " .. tonumber(getElementData(resourceRoot,"winMoney")) .. "$ ##ff0000]≈",getRootElement(),255,255,0,true) setElementData(resourceRoot,"map","no") endDerby() _mytimer = setTimer(newDuel,60*1000*5,1) end end function newDuel() for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap","no") end setElementData(resourceRoot,"map","prestart") outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لدخول الديربي,اكتب في الشـآت ديربي.",getRootElement(),255,255,0,true) RMoney = math.random("50000","300000") setElementData(resourceRoot,"winMoney",tonumber(RMoney)) outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : سيحصل الفآئز في الديربي على #00FF00|" .. RMoney .. "|$",getRootElement(),0,255,0,true) setTimer(checkPlrs,30000,1) end function checkPlrs () c = 0 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 end end if tonumber(c) > 1 then setElementData(resourceRoot,"map","yes") for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then setElementCollisionsEnabled(getPedOccupiedVehicle( p),true) outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لقد بدآء الديربي , يمكنك الانطلاق",p,0,255,0,true) setElementFrozen(getPedOccupiedVehicle(p),false) end end else endDerby() setElementData(resourceRoot,"map","no") outputChatBox("* #00BCCD≈ - ( #555555Derby #00BCCD) : لم يبدآء الديربي, لعدم توفر الاعبين",getRootElement(),255,255,0,true) _mytimer = setTimer(newDuel,60*1000*5,1) end end _mytimer = setTimer(newDuel,3000,1) function onStartLoadSpawns () file = fileOpen("map.map") localFile = fileOpen("map.xml") fileWrite(localFile,"") data = fileRead(file,999999) fileWrite(localFile,data) fileClose(localFile) xml = xmlLoadFile("map.xml") c = 0 for i,data in pairs(xmlNodeGetChildren(xml)) do if xmlNodeGetName(data) == "spawnpoint" then c = c+1 v,xx,yy,zz,rxx,ryy,rzz = xmlNodeGetAttribute(data,"vehicle"),xmlNodeGetAttribute(data,"posX"),xmlNodeGetAttribute(data,"posY"),xmlNodeGetAttribute(data,"posZ"),xmlNodeGetAttribute(data,"rotX"),xmlNodeGetAttribute(data,"rotY"),xmlNodeGetAttribute(data,"rotZ") table.insert(spawns,{id = c,model = v,x = xx,y = yy,z = zz,rx = rxx,ry = ryy,rz = rzz}) end end for i,data in pairs(xmlNodeGetChildren(xml)) do if xmlNodeGetName(data) == "object" then m,xx,yy,zz,rxx,ryy,rzz = xmlNodeGetAttribute(data,"model"),xmlNodeGetAttribute(data,"posX"),xmlNodeGetAttribute(data,"posY"),xmlNodeGetAttribute(data,"posZ"),xmlNodeGetAttribute(data,"rotX"),xmlNodeGetAttribute(data,"rotY"),xmlNodeGetAttribute(data,"rotZ") object = createObject(m,xx,yy,zz,rxx,ryy,rzz) setElementDimension(object,30) end end end setTimer(onStartLoadSpawns,3000,1) function endDerby() for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then killPed(p) end end for i,v in pairs(getElementsByType("vehicle"))do if getElementData(v,"creatorDerby") then destroyElement(v) end end end setTimer(function() for i,p in pairs(getElementsByType("player"))do sea(p) resetHan(p) checkVeh(p) checkModel(p) end end,1000,0) outputChatBox("",getRootElement(),255,255,0,true) function sea(p) if checkExistPlrOnDuel(p) then x,y,z = getElementPosition(p) if tonumber(z) <= 0 then killPed(p) end end end function checkVeh(p) if (tonumber(getElementDimension(p)) == 30) and not (isPedInVehicle(p))then killPed(p) end end function resetHan(p) if checkExistPlrOnDuel(p) then setVehicleHandling (getPedOccupiedVehicle(p), true ) end end function checkModel(p) if checkExistPlrOnDuel(p) and isPedInVehicle(p) then if tonumber(getElementModel(getPedOccupiedVehicle(p)) ) ~= 411 then killPed(p) end end end client.lua addEventHandler("onClientRender",getRootElement(),function() if tostring(getElementData(getLocalPlayer(),"onCrossMap")) == "yes" then setWorldSpecialPropertyEnabled("aircars", false) setWorldSpecialPropertyEnabled("extrajump", false) setWorldSpecialPropertyEnabled("hovercars", false) end end) جربت تضيف الكود اللي ارسله لك نايف ضيفه مع الاكواد اللي انت ارسلتها ذي Link to comment
Master_MTA Posted January 11, 2017 Share Posted January 11, 2017 يا غالي لا تتوقع كل شي ببلاش لا هنت Link to comment
^iiEcoo'x_) Posted January 11, 2017 Share Posted January 11, 2017 2 minutes ago, Master_MTA said: يا غالي لا تتوقع كل شي ببلاش لا هنت شو قصدك؟ ? 2 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