Maksoud Posted August 23, 2016 Share Posted August 23, 2016 السلام عليكم اليوم سويت مود ديربي اقدر ادخله من خلال ماركر الحين سويت الماركر و ظبط كل شئ صار لما ادخل الماركر يقتل اللاعب الاكواد :: # Server spawns = {} local DerbyMarker = createMarker( 2750.90234, -1694.06433, 11.83718 +1, 'arrow', 2,0,0,255,255 ) setElementData(resourceRoot,"map","no") setElementData(resourceRoot,"winMoney","0") addEventHandler( 'onMarkerHit', DerbyMarker, function( hitElement ) if( hitElement ) and ( getElementType( hitElement ) == 'player' ) and not ( isPedInVehicle( hitElement) ) and checkDuel(source) == "prestart" and ( not checkExistPlrOnDuel(source) ) then online = countPlayersOnDerby() if tonumber(online)+1 < 32 then setData(source,"onCrossMap","yes") outputChatBox("المرجو الانتظار...",source,255,255,0,true) setD(hitElement) spawnOnMap(hitElement) else outputChatBox("لم يبق مكان لك بالديربي انتظر حتى الديربي القادم ان شاء الله",source,0,255,0,true) end end end) function checkDuel(p) if tostring(getElementData(resourceRoot,"map")) == "yes" then outputChatBox("انتظر ريثما ينتهي الديربي الحالي",p,255,255,0,true) elseif tostring(getElementData(resourceRoot,"map")) == "no" then outputChatBox("انتظر ريثما يبدأ الديربي",p,255,255,0,true) 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 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 if( hitElement ) and ( getElementType( hitElement ) == 'player' ) then toggleControl(hitElement,"enter_exit", false ) warpPedIntoVehicle(hitElement,v) setCameraTarget(hitElement,hitElement) 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("#CC0000#Derby Distruction Edited By #0069cc#mIDO",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("#00FF00[" .. n .. "]#FFFF00 Won the Derby and Won#00FF00[" .. tonumber(getElementData(resourceRoot,"winMoney")) .. "$]",getRootElement(),255,255,0,true) setElementData(resourceRoot,"map","no") endDerby() setTimer(newDuel,30000,1) end end function newDuel() for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap","no") end setElementData(resourceRoot,"map","prestart") RMoney = math.random("5000","20000") setElementData(resourceRoot,"winMoney",tonumber(RMoney)) outputChatBox("Derby Started / Winning Take :" .. RMoney .. "$ | $ " .. 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("لقد بدأ الديربي , يمكنك الانطلاق , حظآ موفقآ",p,0,255,0,true) setElementFrozen(getPedOccupiedVehicle(p),false) end end else endDerby() setElementData(resourceRoot,"map","no") outputChatBox("! لم يبدأ الديربي لعدم توفر الالعبين",getRootElement(),255,255,0,true) setTimer(newDuel,60000,1) end end 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("#CC0000#Derby Distruction Edited By #0069cc#mIDO",getRootElement(),0,0,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 Link to comment
a7zan Posted August 23, 2016 Share Posted August 23, 2016 السلام عليكماليوم سويت مود ديربي اقدر ادخله من خلال ماركر الحين سويت الماركر و ظبط كل شئ صار لما ادخل الماركر يقتل اللاعب الاكواد :: # Server spawns = {} local DerbyMarker = createMarker( 2750.90234, -1694.06433, 11.83718 +1, 'arrow', 2,0,0,255,255 ) setElementData(resourceRoot,"map","no") setElementData(resourceRoot,"winMoney","0") addEventHandler( 'onMarkerHit', DerbyMarker, function( hitElement ) if( hitElement ) and ( getElementType( hitElement ) == 'player' ) and not ( isPedInVehicle( hitElement) ) and checkDuel(source) == "prestart" and ( not checkExistPlrOnDuel(source) ) then online = countPlayersOnDerby() if tonumber(online)+1 < 32 then setData(source,"onCrossMap","yes") outputChatBox("المرجو الانتظار...",source,255,255,0,true) setD(hitElement) spawnOnMap(hitElement) else outputChatBox("لم يبق مكان لك بالديربي انتظر حتى الديربي القادم ان شاء الله",source,0,255,0,true) end end end) function checkDuel(p) if tostring(getElementData(resourceRoot,"map")) == "yes" then outputChatBox("انتظر ريثما ينتهي الديربي الحالي",p,255,255,0,true) elseif tostring(getElementData(resourceRoot,"map")) == "no" then outputChatBox("انتظر ريثما يبدأ الديربي",p,255,255,0,true) 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 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 if( hitElement ) and ( getElementType( hitElement ) == 'player' ) then toggleControl(hitElement,"enter_exit", false ) warpPedIntoVehicle(hitElement,v) setCameraTarget(hitElement,hitElement) 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("#CC0000#Derby Distruction Edited By #0069cc#mIDO",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("#00FF00[" .. n .. "]#FFFF00 Won the Derby and Won#00FF00[" .. tonumber(getElementData(resourceRoot,"winMoney")) .. "$]",getRootElement(),255,255,0,true) setElementData(resourceRoot,"map","no") endDerby() setTimer(newDuel,30000,1) end end function newDuel() for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap","no") end setElementData(resourceRoot,"map","prestart") RMoney = math.random("5000","20000") setElementData(resourceRoot,"winMoney",tonumber(RMoney)) outputChatBox("Derby Started / Winning Take :" .. RMoney .. "$ | $ " .. 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("لقد بدأ الديربي , يمكنك الانطلاق , حظآ موفقآ",p,0,255,0,true) setElementFrozen(getPedOccupiedVehicle(p),false) end end else endDerby() setElementData(resourceRoot,"map","no") outputChatBox("! لم يبدأ الديربي لعدم توفر الالعبين",getRootElement(),255,255,0,true) setTimer(newDuel,60000,1) end end 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("#CC0000#Derby Distruction Edited By #0069cc#mIDO",getRootElement(),0,0,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 اذا انت مسويه كيف ماعرفت ليه يموت الاعب ؟ Link to comment
#Al3aGraB<3 Posted August 23, 2016 Share Posted August 23, 2016 مب هدا الكود حق سفاح ؟ Link to comment
Maksoud Posted August 23, 2016 Author Share Posted August 23, 2016 خخخخ انا عدلت عليهه انا سويت فقط الماركر ! طالب مساعدة مب طالب مزح ! Link to comment
^iiEcoo'x_) Posted August 24, 2016 Share Posted August 24, 2016 من سطر 191 لين سطر 198 الفنكشنات المستخدمه فيها شروط اذا كنت مو مطبقها يقتل اللاعب. Link to comment
فاّرس Posted August 24, 2016 Share Posted August 24, 2016 ^ ذا ردي لواحد بموضوع قديم, صاحب الموضوع ذا معدل الاكواد يعني اغلب الوظائف فيها تحققات وشروط اذا ماتوفرت يقتل اللاعب, دامك مب مسوي الكود اسأل اللي سواه, او حلل الكود بنفسك وتشوف ليه ينقتل اللاعب, الكود طويل .. Link to comment
Maksoud Posted August 24, 2016 Author Share Posted August 24, 2016 عايز مساعدة يوم يخش الماركر يدخله الديربي Link to comment
N3xT Posted August 24, 2016 Share Posted August 24, 2016 عايز مساعدةيوم يخش الماركر يدخله الديربي ما فهمنا لك والله, كل شوي تطلع بكلام يختلف عن اللي قبله فوق بالموضوع أنت كاتب " اليوم سويت مود ديربي اقدر ادخله من خلال ماركر " والحين تقول عايز مساعدة Link to comment
Maksoud Posted August 24, 2016 Author Share Posted August 24, 2016 انتوا كلكوا كدا ؟؟ بتقفوا على الواحدة !! غلط يا عم و قلت سويت و قلت عدلت مب سويت و بعدين انا بدى مساعدة فعلا عندى مشكلة مع ماركر الدخول لما اجى ادخله يقتلنى !! Link to comment
N3xT Posted August 25, 2016 Share Posted August 25, 2016 انتوا كلكوا كدا ؟؟ بتقفوا على الواحدة !! غلط يا عم و قلت سويت و قلت عدلت مب سويت و بعدين انا بدى مساعدة فعلا عندى مشكلة مع ماركر الدخول لما اجى ادخله يقتلنى !! أنا أتكلم بشيء وأنت بشيء, أنا ما قلت أنه أنت سويت المود أتكلم عن تعديلك حق دخول الماركر عموماً مثل ماقال لك شاطح الكود كله تحققات, وصعبة بقعد افتش سطر سطر عن التحقق فتش عنها بنفسك أو كلم صاحب الكود هو اللي يعرف كوده وتحققاته Link to comment
!#NssoR_) Posted August 25, 2016 Share Posted August 25, 2016 صاحبه NsooR لا اخوي مو انا صاحب المود , انا بس عدلته لك بأحد المواضيع او اني عدلته لك خاص فقط Link to comment
iMr.SFA7 Posted August 25, 2016 Share Posted August 25, 2016 spawns = {} local DerbyMarker = createMarker( 2750.90234, -1694.06433, 11.83718 +1, 'arrow', 2,0,0,255,255 ) setElementData(resourceRoot,"map","no") setElementData(resourceRoot,"winMoney","0") addEventHandler( 'onMarkerHit', DerbyMarker, function( hitElement ) if( hitElement ) and ( getElementType( hitElement ) == 'player' ) and not ( isPedInVehicle( hitElement) ) and checkDuel(hitElement) == "prestart" and ( not checkExistPlrOnDuel(hitElement) ) then online = countPlayersOnDerby() if tonumber(online)+1 < 32 then setData(hitElement,"onCrossMap","yes") outputChatBox("المرجو الانتظار...",hitElement,255,255,0,true) setD(hitElement) spawnOnMap(hitElement) else outputChatBox("لم يبق مكان لك بالديربي انتظر حتى الديربي القادم ان شاء الله",hitElement,0,255,0,true) end end end) function checkDuel(p) if tostring(getElementData(resourceRoot,"map")) == "yes" then outputChatBox("انتظر ريثما ينتهي الديربي الحالي",p,255,255,0,true) elseif tostring(getElementData(resourceRoot,"map")) == "no" then outputChatBox("انتظر ريثما يبدأ الديربي",p,255,255,0,true) 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 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 if( hitElement ) and ( getElementType( hitElement ) == 'player' ) then toggleControl(hitElement,"enter_exit", false ) warpPedIntoVehicle(hitElement,v) setCameraTarget(hitElement,hitElement) 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("#CC0000#Derby Distruction Edited By #0069cc#mIDO",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("#00FF00[" .. n .. "]#FFFF00 Won the Derby and Won#00FF00[" .. tonumber(getElementData(resourceRoot,"winMoney")) .. "$]",getRootElement(),255,255,0,true) setElementData(resourceRoot,"map","no") endDerby() setTimer(newDuel,30000,1) end end function newDuel() for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap","no") end setElementData(resourceRoot,"map","prestart") RMoney = math.random("5000","20000") setElementData(resourceRoot,"winMoney",tonumber(RMoney)) outputChatBox("Derby Started / Winning Take :" .. RMoney .. "$ | $ " .. 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("لقد بدأ الديربي , يمكنك الانطلاق , حظآ موفقآ",p,0,255,0,true) setElementFrozen(getPedOccupiedVehicle(p),false) end end else endDerby() setElementData(resourceRoot,"map","no") outputChatBox("! لم يبدأ الديربي لعدم توفر الالعبين",getRootElement(),255,255,0,true) setTimer(newDuel,60000,1) end end 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("#CC0000#Derby Distruction Edited By #0069cc#mIDO",getRootElement(),0,0,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 source > hitElement 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