Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/06/18 in all areas

  1. X internal.db ==> خاص بالحسابات والداتا اكاونت registery.db ==> خآص ب الsql الأفضل حفظهم الاثنين
    2 points
  2. السلام عليكم ورحمة الله وبركاته أقدم لكم اليوم أخر مشاريعي وأفضلها بالنسبة لي وأصعبها, حيث استغرق مني هذا العمل الضخم 20 يوم و 1600 سطر وهو عبارة عن لوحة أدمنية خارجية تمكنك من التحكم بالسيرفر بدون تشغيل اللعبة والدخول للسيرفر, وبالنسبة لي سيكون مفيد جداً وأسرع C# - LUA : لغات البرمجة : مقطع توضيحي للبرنامج : ملاحظات أولاً : لا تغير اسم السكربت ولا ما راح يشتغل البرنامج ثانياً : السكربت يحتاج صلاحيات ادمن ثالثاً : للتعديل على القروبات أو الصلاحيات راجع ملف الميتا التحميل : اضغط هنا للتبليغ عن الأخطاء أو الاقتراحات أو المشاكل تفضل بالأسفل أو الرسائل الخاصة مع تحياتي لكم
    1 point
  3. يب صح ما خططرت ببالي شكرا اخوي تفكيرك صح بسويها ف مره ثانية او اسويها الحين افضل
    1 point
  4. getPlayerName ( getAccountPlayer ( getAccount ( "YourAccount" ) ) ) -- or getPlayerName ( getAccountPlayer ( getPlayerAccount ( source ) ) )
    1 point
  5. هذا المود طويل وعريض .. ولو انت مو مسويه ومو مبرمجه من الصفر راح تطول وانت تجرب تعرف وتشيل وتغير , ف الافضل انك تسويه بنفسك
    1 point
  6. مشكور + ان شاء الله تصير افضل مني
    1 point
  7. function getPlayerNameFromAccount(account) if account and type(account) == "string" then local acc = getAccount(account) if acc then for _,player in ipairs(getElementsByType("player")) do local a = getPlayerAccount(player) if a and a == acc then return getPlayerName(player) end end end end return false end
    1 point
  8. ليكون ما تلعبها او ما كنت ؟ ذذ
    1 point
  9. خلاص يبويا تراه رد مافي داعي ترد انا نسيت لا اكثر مافي داعي انك تكرر كلامه دامك تعرف وهو كتب خلي معلومتك لنفسك الله لا يبلانا بس .. :#
    1 point
  10. يب انا استغربت لما هو قال registery.db والصحيح هو internal.db
    1 point
  11. الصراحة عمل جبار مشاء الله استمر بالتوفيق لك
    1 point
  12. اشتغل اخيرا - تسلم ما قصرت *( شوف الخاص )*
    1 point
  13. Add to the table the player coordinates of entrance/exit: local Markers = { -- outX, outY, outZ, outInt, outDim, inX, inY, inZ, inInt, inDim {1852.8375244141, -1752.1379394531, 13.3828125, 0, 0, 1839.7073974609, -1745.7852783203, 13.546875, 0, 0, entrancePos = { x, y, z, rot }, exitPos = { x, y, z, rot } }, {1825.2690429688, -1758.576171875, 13.3828125, 0, 0, 1815.5324707031, -1769.6801757813, 13.546875, 0, 0 entrancePos = { x, y, z, rot }, exitPos = { x, y, z, rot } } } local teleportMarkers = {} addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function() for k, v in pairs(Markers) do local outX, outY, outZ, outDim, outInt, inX, inY, inZ, inDim, inInt = v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9], v[10] teleportMarkers[k] = { createMarker(inX, inY, inZ, "cylinder", 1, 0, 255, 0, 180), -- inside createMarker(outX, outY, outZ, "cylinder", 1, 255, 0, 0, 150) -- outside } setElementInterior( teleportMarkers[k][1], inDim ) setElementPosition( teleportMarkers[k][1], inInt ) addEventHandler( "onMarkerHit", teleportMarkers[k][2], function ( hitElement, matchingDimension ) if getElementType(hitElement) == "player" and matchingDimension then local px,py,pz,rot = unpack( Markers[k].entrancePos ) setElementPosition( hitElement, px, py, pz+1 ) setElementRotation( hitElement, 0, 0, rot ) setElementDimension( hitElement, Markers[k][10] ) setElementInterior( hitElement, Markers[k][9] ) end end) addEventHandler( "onMarkerHit", teleportMarkers[k][1], function ( hitElement, matchingDimension ) if getElementType(hitElement) == "player" and matchingDimension then local px,py,pz,rot = unpack( Markers[k].exitPos ) setElementPosition( hitElement, px, py, pz+1 ) setElementRotation( hitElement, 0, 0, rot ) setElementDimension( hitElement, Markers[k][5] ) setElementInterior( hitElement, Markers[k][4] ) end end) end)
    1 point
  14. للأمانة تعليقاتكم حفزتي وشجعتني أني اكمل المشروع ذا وباذن الله وان شاء الله ما اسحب عليه مثل سكربتاتي واقول فيه تحديث له واسحب ولكن بحاول اضيف ميزات اكثر واكثر واصلح البقات, ونورتم جميعاً
    1 point
  15. مبدع يخي ربنا يحفظك وتكمل ابداعك علي مر الزمان تحياتي لكـ
    1 point
  16. addEvent("datta",true) addEventHandler("datta",root,function ( ) local plrAccount = getPlayerAccount ( source ) ; if ( not isGuestAccount ( plrAccount ) ) then setAccountData ( plrAccount , "Showing" , "No" ) ; outputChatBox ( "* System : #ffffff تم الغاء اظهار اللوحة لك مرة ثانية",source,255,0,0,true ) end end ) ; addEventHandler("onPlayerLogin", root,function ( _ , acc ) if ( getAccountData ( acc , "Showing" ) and getAccountData ( acc , "Showing" ) ~= "No" ) then triggerClientEvent ( source , "firstlogin" , source ) end end ) ;
    1 point
  17. الشغله ماهي تحدي الله يصلحك، مافيه شي صعب... بس كيف تبغانا نعرف المشكله بدون مانشوف السورس كود؟ طيب جرب الديبوق فيه مشكله ؟ يمكن صاحبك يفك الضغط عن اللوحه وتنتج أكثر من ملف وتخرب؟ يمكن حاط اللوحه داخل أكثر من ملف ويخرب مسار اللوحه؟ عطنا الأخطاء اللي تظهر له؟
    1 point
  18. جرب الكود الي رسلته لك ذا --server outputChatBox("#610B0B.:#585858[ #610B0BDrift_Mission By |M.r|LooFe|#585858 ]#610B0B:.",root,255,255,0,true) addEventHandler( 'onPlayerCommand', getRootElement( ), function( cmd ) if ( getElementData( source,"Mission" ) == true and cmd == 'admin' ) then cancelEvent( ) outputChatBox("* Admin : لايمكنك إستخدام اللوحة في المهمات",source,255,0,0) end end ) spawns = {} setElementData(resourceRoot,"map1","no") setElementData(resourceRoot,"winMoney1","0") addEventHandler("onPlayerChat",getRootElement(),function(message) if tostring(message) == "دخول" and checkDuel(source) == "prestart" and ( not checkExistPlrOnDuel(source) ) then online = countPlayersOnDerby() if tonumber(online)+1 < 32 then setData(source,"Mission","yes") setData(source,"onCrossMap1","yes") outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA تم اضافتك في المهمة , انتظر حتى يبدأ القيم #800000#",source,255,255,0,true) setD(source) triggerClientEvent(source,"openGuiDrift",source) spawnOnMap(source) else outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA امتلئت المهمة , الرجاء انتظار القيم القآدم #800000#",source,0,255,0,true) end end end) function checkDuel(p) if tostring(getElementData(resourceRoot,"map1")) == "yes" then outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA المهمة شغالة حاليا #800000#",p,255,255,0,true) elseif tostring(getElementData(resourceRoot,"map1")) == "no" then outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA المهمة غير شغالة حاليا #800000#",p,255,255,0,true) end return tostring(getElementData(resourceRoot,"map1")) end function checkExistPlrOnDuel(p) per = getElementData(p,"onCrossMap1") 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,140) 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,140) setElementFrozen(v,true) setElementData(v,"creatorShoter","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,140) setElementFrozen(v,true) setElementData(v,"creatorShoter","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,"onCrossMap1","no") checkEnd() end end addEventHandler("onPlayerWasted",getRootElement(),eventCheck) addEventHandler("onPlayerQuit",getRootElement(),eventCheck) addEventHandler("onPlayerJoin",getRootElement(),function() setData(source,"onCrossMap1","no") end) for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap1","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,"winMoney1"))) n = string.gsub(getPlayerName(winner), "#%x%x%x%x%x%x", "") outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF: #610B0B[ #6E6E6E" .. n .. " #610B0B] #FFFAAA مبروك للفائز في مهمة الدرفت",root,255,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) setElementData(resourceRoot,"map1","no") endDerby() setTimer(newDuel,30000,1) end end function newDuel() for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap1","no") end setElementData(resourceRoot,"map1","prestart") outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA للدخول الى مهمة الدرفت اكتب في الشات دخول",getRootElement(),255,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) RMoney = math.random("50000","300000") setElementData(resourceRoot,"winMoney1",tonumber(RMoney)) 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,"map1","yes") for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then setElementCollisionsEnabled(getPedOccupiedVehicle(p),true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA لقد بدأ الدرفت يمكنك الانطلاق",p,0,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) setElementFrozen(getPedOccupiedVehicle(p),false) end end else endDerby() setElementData(resourceRoot,"map1","no") outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA ! لم يبدأ الدرفت لعدم توفر لاعبين",getRootElement(),255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) setTimer(newDuel,60000,1) end end setTimer(newDuel,3000,1) function onStartLoadSpawns () file = fileOpen("map1.map") localFile = fileOpen("map1.xml") fileWrite(localFile,"") data = fileRead(file,999999) fileWrite(localFile,data) fileClose(localFile) xml = xmlLoadFile("map1.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,140) 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,"creatorShoter") 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) 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)) == 140) 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 addEventHandler("onClientRender",getRootElement(),function() if tostring(getElementData(getLocalPlayer(),"onCrossMap1")) == "yes" then setWorldSpecialPropertyEnabled("aircars", false) setWorldSpecialPropertyEnabled("extrajump", false) setWorldSpecialPropertyEnabled("hovercars", false) end end) local Keys,Dim = {"F1","F2","F3","F4","F5","F6","F7","F9","F10","p","m","j","`","]","[","/","F","enter","shift","x","b","k","o"} , 140 ; addEventHandler ( "onClientKey" , root , function ( key , press ) if ( press and getElementDimension ( localPlayer ) == Dim ) then for k,v in ipairs ( Keys ) do if ( v == key ) then cancelEvent() end end end end ) ; addEvent("openGuiDrift",true) addEventHandler("openGuiDrift",root, function () guiSetVisible(wnd,true ) showCursor ( true ) end ) addEventHandler("onClientGUIClick",root, function () if source == ex then if(guiGetVisible(اسم اللوحة) == false)then end guiSetVisible(اسم اللوحة,false) showCursor(false) guiSetInputEnabled(false) end end) لا تبخل علينا ب اللايك ي كبير <3
    1 point
  19. ما اشوف لوحة ب إسم wnd + --server outputChatBox("#610B0B.:#585858[ #610B0BDrift_Mission By |M.r|LooFe|#585858 ]#610B0B:.",root,255,255,0,true) addEventHandler( 'onPlayerCommand', getRootElement( ), function( cmd ) if ( getElementData( source,"Mission" ) == true and cmd == 'admin' ) then cancelEvent( ) outputChatBox("* Admin : لايمكنك إستخدام اللوحة في المهمات",source,255,0,0) end end ) spawns = {} setElementData(resourceRoot,"map1","no") setElementData(resourceRoot,"winMoney1","0") addEventHandler("onPlayerChat",getRootElement(),function(message) if tostring(message) == "دخول" and checkDuel(source) == "prestart" and ( not checkExistPlrOnDuel(source) ) then online = countPlayersOnDerby() if tonumber(online)+1 < 32 then setData(source,"Mission","yes") setData(source,"onCrossMap1","yes") outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA تم اضافتك في المهمة , انتظر حتى يبدأ القيم #800000#",source,255,255,0,true) setD(source) triggerClientEvent(source,"openGuiDrift",source) spawnOnMap(source) else outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA امتلئت المهمة , الرجاء انتظار القيم القآدم #800000#",source,0,255,0,true) end end end) function checkDuel(p) if tostring(getElementData(resourceRoot,"map1")) == "yes" then outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA المهمة شغالة حاليا #800000#",p,255,255,0,true) elseif tostring(getElementData(resourceRoot,"map1")) == "no" then outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA المهمة غير شغالة حاليا #800000#",p,255,255,0,true) end return tostring(getElementData(resourceRoot,"map1")) end function checkExistPlrOnDuel(p) per = getElementData(p,"onCrossMap1") 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,140) 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,140) setElementFrozen(v,true) setElementData(v,"creatorShoter","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,140) setElementFrozen(v,true) setElementData(v,"creatorShoter","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,"onCrossMap1","no") checkEnd() end end addEventHandler("onPlayerWasted",getRootElement(),eventCheck) addEventHandler("onPlayerQuit",getRootElement(),eventCheck) addEventHandler("onPlayerJoin",getRootElement(),function() setData(source,"onCrossMap1","no") end) for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap1","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,"winMoney1"))) n = string.gsub(getPlayerName(winner), "#%x%x%x%x%x%x", "") outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF: #610B0B[ #6E6E6E" .. n .. " #610B0B] #FFFAAA مبروك للفائز في مهمة الدرفت",root,255,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) setElementData(resourceRoot,"map1","no") endDerby() setTimer(newDuel,30000,1) end end function newDuel() for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap1","no") end setElementData(resourceRoot,"map1","prestart") outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA للدخول الى مهمة الدرفت اكتب في الشات دخول",getRootElement(),255,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) RMoney = math.random("50000","300000") setElementData(resourceRoot,"winMoney1",tonumber(RMoney)) 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,"map1","yes") for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then setElementCollisionsEnabled(getPedOccupiedVehicle(p),true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA لقد بدأ الدرفت يمكنك الانطلاق",p,0,255,0,true) outputChatBox(" ",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) setElementFrozen(getPedOccupiedVehicle(p),false) end end else endDerby() setElementData(resourceRoot,"map1","no") outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#FFFAAA ! لم يبدأ الدرفت لعدم توفر لاعبين",getRootElement(),255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:",root,255,255,0,true) outputChatBox("#585858[ #610B0BDrift_Mission #585858] #FFFFFF:#610B0B =====================================",root,255,255,0,true) setTimer(newDuel,60000,1) end end setTimer(newDuel,3000,1) function onStartLoadSpawns () file = fileOpen("map1.map") localFile = fileOpen("map1.xml") fileWrite(localFile,"") data = fileRead(file,999999) fileWrite(localFile,data) fileClose(localFile) xml = xmlLoadFile("map1.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,140) 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,"creatorShoter") 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) 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)) == 140) 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 addEventHandler("onClientRender",getRootElement(),function() if tostring(getElementData(getLocalPlayer(),"onCrossMap1")) == "yes" then setWorldSpecialPropertyEnabled("aircars", false) setWorldSpecialPropertyEnabled("extrajump", false) setWorldSpecialPropertyEnabled("hovercars", false) end end) local Keys,Dim = {"F1","F2","F3","F4","F5","F6","F7","F9","F10","p","m","j","`","]","[","/","F","enter","shift","x","b","k","o"} , 140 ; addEventHandler ( "onClientKey" , root , function ( key , press ) if ( press and getElementDimension ( localPlayer ) == Dim ) then for k,v in ipairs ( Keys ) do if ( v == key ) then cancelEvent() end end end end ) ; addEvent("openGuiDrift",true) addEventHandler("openGuiDrift",root, function () guiSetVisible(wnd,true ) showCursor ( true ) end ) addEventHandler("onClientGUIClick",root, function () if source == ex then if(guiGetVisible(اسم اللوحة) == false)then end guiSetVisible(اسم اللوحة,false) showCursor(false) guiSetInputEnabled(false) end end) Try
    1 point
×
×
  • Create New...