Jump to content

kamel10

Members
  • Posts

    317
  • Joined

  • Last visited

Everything posted by kamel10

  1. ابي مود توزيع الفلوس وابي بدال هذا givePlayerMoney (getRootElement(),amount) هذا setElementData(getRootElement(), "Money", (getElementData(getRootElement(), "Money") or 0) + amount)
  2. ممكن تخليها ميوت يوم ؟
  3. ابي مود اذا قال شخص كلمة ياخذ باند مؤبد
  4. كيف للمساعدة انا ابي مساعدة في كود .. edit: تم التصليح بنفسي
  5. خلاص حليت المشكلة الحين ابي كود لما يبي ياخذ الشرطي الشنطة ما يقدر
  6. كيف سورس هنا ماركر عشان انا الي ضايفه عشان ما ياخذ الشنطة الشرطي كيف اصلحه
  7. يقول في خطأ في السطر 107 mark = { {1125.1999511719, -2037.1999511719, 69.300003051758}, {1682.3000488281, -2290.1000976563, -1.7999999523163}, {1883.1999511719, -1991.4000244141, 13.199999809265}, {2799.6999511719, -2417.3000488281, 13.300000190735}, {2896.3999023438, -1960.6999511719, 4}, {406.39999389648, -1539.9000244141, 31.700000762939}, {1083.5, -683.5, 113.80000305176}, {613.09997558594, -607.70001220703, 17}, {2476.6000976563, -945.5, 80.300003051758}, {2564, -118, 51.799999237061}, {1726.5999755859, -1880.4000244141, 13.699999809265}, {154.30000305176, -1942.4000244141, 3.4000000953674}, {815.20001220703, -1094.5, 25.39999961853}, {1742.6999511719, -1562.1999511719, 13.800000190735}, {2141.1999511719, -2262.6000976563, 12.89999961853}, {991.29998779297, -1525.1999511719, 13.5}, {-100.90000152588, -1567.8000488281, 2.5999999046326}, {2809.8999023438, -1182, 24.5}, {1819.4000244141, -1142.6999511719, 23.700000762939}, {2520.1999511719, -1487, 23.60000038147}, {2337.3999023438, -1245.4000244141, 22.10000038147}, {320.29998779297, -1328.8000488281, 14.39999961853}, {1154.0999755859, -1879.9000244141, 13.199999809265}, {1792.5, -2302.6999511719, -2.7000000476837}, {829.29998779297, -923.09997558594, 54.900001525879}, {561.29998779297, -1359.0999755859, 14.800000190735}, {1899, -1992.5, 13.300000190735}, {1881.5999755859, -1313.4000244141, 14.39999961853}, {538.90002441406, -1318.9000244141, 17.200000762939}, {784.5, -1734.9000244141, 13.199999809265} } bag = { {1244.6685791016, -1258.5989990234, 12.174118041992}, {872.66986083984, -1341.521484375, 12.546875}, {1118.1220703125, -1022.8830566406, 33.9921875}, {1468.650390625, -904.47052001953, 53.8359375}, {2113.5920410156, -1498.5637207031, 9.421875}, {2388.1765136719, -1820.4766845703, 12.546875}, {1984.7507324219, -1718.9265136719, 14.96875}, {1741.8079833984, -2691.5715332031, 5.0636463165283}, {1339.5395507813, -2345.6655273438, 12.546875}, {1342.1771240234, -1675.142578125, 16.718641281128}, {1504.9318847656, -1152.5692138672, 23.078125}, {2140.2512207031, -1007.2143554688, 60.752571105957}, {2524.7338867188, -2254.7697753906, 12.331317901611}, {2183.2648925781, -2667.9069824219, 16.882808685303}, {2874.8630371094, -1590.6097412109, 21.388389587402}, {2266.5122070313, 167.56521606445, 27.153551101685}, {2245.3803710938, -121.53649902344, 27.153547286987}, {1678.0913085938, -894.224609375, 53.008686065674}, {1519.1584472656, -1452.7445068359, 13.203125}, {1270.2076416016, -1468.4309082031, 9.046875}, {1429.2014160156, -1863.6143798828, 12.546875}, {663.50268554688, -1577.4061279297, 13.54674911499}, {558.54724121094, -1075.4486083984, 71.921989440918}, {725.05718994141, -439.31225585938, 15.3359375}, {1442.4204101563, -629.80712890625, 94.718566894531}, {2111.8723144531, -1255.9906005859, 24.488334655762}, {2290.7302246094, -2017.2045898438, 12.542568206787}, {1651.3283691406, -2538.0241699219, 12.546875}, {2519.8571777344, -2688.7385253906, 12.647548675537}, {2530.2971191406, -2434.9482421875, 16.882808685303}, } function createBag() local mt = math.random(#bag) ob = createObject(1210,bag[mt][1],bag[mt][2],bag[mt][3]) setElementCollisionsEnabled(ob,false) time = setTimer(roo,100,0,ob) mar = createMarker(bag[mt][1],bag[mt][2],bag[mt][3],"corona",0.5,255,0,0,120) bl = createBlipAttachedTo(mar,17) setElementData(mar,"num",mt) exports.guimessages:outputServer(root,"* #0069c7The Briefcase Has Been Started",0,255,0,true) end addEventHandler("onResourceStart",resourceRoot,createBag) addEventHandler("onMarkerHit",root, function (player) if ( source == mar ) then if getElementType(player) == "player" then local x,y,z = getElementPosition(player) local data = getElementData(mar,"num") local data = tonumber(data) destroyElement(mar) destroyElement(ob) destroyElement(bl) killTimer(time) setElementData(player,"bag",true) atBag = createObject(1210,x,y,z) setElementData(atBag,"num",data) exports.bone_attach:attachElementToBone(atBag,player,12,0,0.05,0.27,0,180,0) bli = createBlipAttachedTo(player,17) exports.guimessages:outputServer(root,"* #ffffff[ #ff0000" .. getPlayerName(player) .. "#ffffff ]#0069c7 Has Take The Bag",0,255,0,true) marker = createMarker(mark[data][1],mark[data][2],mark[data][3],"cylinder",1.5,255,255,0,255,player) marBli = createBlipAttachedTo(marker,12,2,255,0,0,255,0,99999.0,player) end if ( isPedInVehicle( player ) ) then return end if ( getTeamN(source) == "Police" ) then exports.guimessages:outputServer(player,"#0069c7Police Can't Take The Bag",0,255,0,true) return end) function roo(ele) local x,y,z = getElementRotation(ele) setElementRotation(ele,x,y,z + 5) end addEventHandler("onPlayerWasted",root, function () if getElementData(source,"bag") and getElementData(source,"bag") == true then local data = getElementData(atBag,"num") local data = tonumber(data) local x,y,z = getElementPosition(source) setElementData(source,"bag",false) destroyElement(atBag) destroyElement(marker) destroyElement(bli) destroyElement(marBli) ob = createObject(1210,x,y,z) setElementCollisionsEnabled(ob,false) time = setTimer(roo,100,0,ob) mar = createMarker(x,y,z,"corona",0.5,255,0,0,120) setElementData(mar,"num",data) bl = createBlipAttachedTo(mar,17) end end end ) addEventHandler("onMarkerHit",root, function (player) if ( source == marker ) then if getElementType(player) == "player" then setElementData(player,"bag",false) destroyElement(marker) destroyElement(marBli) destroyElement(bli) destroyElement(atBag) exports.guimessages:outputServer(root,"* #ffffff[ #ff0000" .. getPlayerName(player) .. " #ffffff] #0069c7Has Won #00ff0050000$ #0069c7From The Bag",255,0,0,true) setElementData(player, "Money", getElementData(player, "Money") + 50000) triggerClientEvent(player,"onShowMoney",player) setTimer(createBag,30000,1) end end end ) addEventHandler("onVehicleStartEnter",root, function (player) if getElementData(player,"bag") and getElementData(player,"bag") == true then cancelEvent() exports.guimessages:outputServer(player,"* #0069c7You Can't Enter The Vehicle You Have The Bag",255,0,0,true) end end ) addEventHandler("onPlayerQuit",root, function () if getElementData(source,"bag") and getElementData(source,"bag") == true then local data = getElementData(atBag,"num") local data = tonumber(data) local x,y,z = getElementPosition(source) setElementData(source,"bag",false) destroyElement(atBag) destroyElement(marker) destroyElement(bli) destroyElement(marBli) ob = createObject(1210,x,y,z) setElementCollisionsEnabled(ob,false) time = setTimer(roo,100,0,ob) mar = createMarker(x,y,z,"corona",0.5,255,0,0,120) setElementData(mar,"num",data) bl = createBlipAttachedTo(mar,17) end end )
  8. طيب ممكن تعلمني
  9. ما شتغل المود يقول خطأ في السطر 314
  10. ممكن تسويه انت
  11. شباب انا عندي مقر ثاني شغال جيد لو قتل شرطي حرامي يروح للسجن مو للمقر يمكن يساعدكم في حل مشكلتي سيرفر DELETED
  12. طيب وكيف يعني واحد من العصابة يروح للمقر يعني يروح مشي
  13. ابي كيف اسوي يعني واحد لما ياخذ الشنطة تجيه عليه ضوء احمر ا وردي يعني هو الي اخذ الشنطة سيرفر mark = { {1912.7153320313,-1353.298828125,14.034099578857}, {965.12274169922,-1254.515625,16.978940963745}, {767.3583984375,-1089.9201660156,24.0859375}, {1119.6906738281,-1667.3558349609,13.632842063904}, {1594.3298339844,-1555.9375,13.586387634277}, {2550.1772460938,-1209.9743652344,54.543243408203}, {2440.9250488281,-1900.4132080078,13.546875}, {2801.7236328125,-2033.1927490234,13.5546875}, {2478.498046875,-1962.2583007813,16.7578125}, {2238.3420410156,-2155.6213378906,13.553833007813}, } bag = { {1578.2777099609,-1345.7055664063,16.484375}, {1302.3748779297,-1463.0034179688,10.046875}, {839.49645996094,-1373.4074707031,22.532068252563}, {913.87054443359,-1239.5350341797,17.019510269165}, {1343.0270996094,-1665.2170410156,13.581394195557}, {2755.1091308594,-1431.0084228516,30.453125}, {2504.1252441406,-1688.5943603516,13.556813240051}, {2448.0864257813,-2119.3666992188,13.546875}, {2676.2385253906,-1791.9935302734,11.84375}, {2754.1650390625,-2099.2358398438,12.10768699646}, } function createBag() local mt = math.random(#bag) ob = createObject(1210,bag[mt][1],bag[mt][2],bag[mt][3]) setElementCollisionsEnabled(ob,false) time = setTimer(roo,100,0,ob) mar = createMarker(bag[mt][1],bag[mt][2],bag[mt][3],"corona",0.5,255,0,0,120) bl = createBlipAttachedTo(mar,17) setElementData(mar,"num",mt) exports.guimessages:outputServer(root,"* #0069c7The Briefcase Has Been Started",0,255,0,true) end addEventHandler("onResourceStart",resourceRoot,createBag) addEventHandler("onMarkerHit",root, function (player) if ( source == mar ) then if getElementType(player) == "player" then local x,y,z = getElementPosition(player) local data = getElementData(mar,"num") local data = tonumber(data) destroyElement(mar) destroyElement(ob) destroyElement(bl) killTimer(time) setElementData(player,"bag",true) atBag = createObject(1210,x,y,z) setElementData(atBag,"num",data) exports.bone_attach:attachElementToBone(atBag,player,12,0,0.05,0.27,0,180,0) bli = createBlipAttachedTo(player,17) exports.guimessages:outputServer(root,"* #ffffff[ #ff0000" .. getPlayerName(player) .. "#ffffff ]#0069c7 Has Take The Bag",0,255,0,true) marker = createMarker(mark[data][1],mark[data][2],mark[data][3],"cylinder",1.5,255,255,0,255,player) marBli = createBlipAttachedTo(marker,12,2,255,0,0,255,0,99999.0,player) end if ( isPedInVehicle( player ) ) then return end end end ) function roo(ele) local x,y,z = getElementRotation(ele) setElementRotation(ele,x,y,z + 5) end addEventHandler("onPlayerWasted",root, function () if getElementData(source,"bag") and getElementData(source,"bag") == true then local data = getElementData(atBag,"num") local data = tonumber(data) local x,y,z = getElementPosition(source) setElementData(source,"bag",false) destroyElement(atBag) destroyElement(marker) destroyElement(bli) destroyElement(marBli) ob = createObject(1210,x,y,z) setElementCollisionsEnabled(ob,false) time = setTimer(roo,100,0,ob) mar = createMarker(x,y,z,"corona",0.5,255,0,0,120) setElementData(mar,"num",data) bl = createBlipAttachedTo(mar,17) end end ) addEventHandler("onMarkerHit",root, function (player) if ( source == marker ) then if getElementType(player) == "player" then setElementData(player,"bag",false) destroyElement(marker) destroyElement(marBli) destroyElement(bli) destroyElement(atBag) exports.guimessages:outputServer(root,"* #ffffff[ #ff0000" .. getPlayerName(player) .. " #ffffff] #0069c7Has Won #00ff0050000$ #0069c7From The Bag",255,0,0,true) setElementData(player, "Money", (getElementData(player, "Money") or 0) + 50000) triggerClientEvent(player,"onShowMoney",player) setTimer(createBag,300000,1) end end end ) addEventHandler("onVehicleStartEnter",root, function (player) if getElementData(player,"bag") and getElementData(player,"bag") == true then cancelEvent() exports.guimessages:outputServer(player,"* #0069c7You Can't Enter The Vehicle You Have The Bag",255,0,0,true) end end ) addEventHandler("onPlayerQuit",root, function () if getElementData(source,"bag") and getElementData(source,"bag") == true then local data = getElementData(atBag,"num") local data = tonumber(data) local x,y,z = getElementPosition(source) setElementData(source,"bag",false) destroyElement(atBag) destroyElement(marker) destroyElement(bli) destroyElement(marBli) ob = createObject(1210,x,y,z) setElementCollisionsEnabled(ob,false) time = setTimer(roo,100,0,ob) mar = createMarker(x,y,z,"corona",0.5,255,0,0,120) setElementData(mar,"num",data) bl = createBlipAttachedTo(mar,17) end end )
  14. يكتب police kill all gangaster بس ما تنتهي المهمة وما يخرجو منها و مايخذو فلوس
  15. يكتب police kill all gangaster بس ما تنتهي المهمة وما يخرجو منها و مايخذو فلوس
  16. الحين في مشكلة لما يقتل الشرطة الحرامية المهمة لا تنتهي تبقى كما هي يقول الخطأ في server:272 attempt to perform
  17. local Display = textCreateDisplay() local CrText = textCreateTextItem("0 Criminal", 0.05, 0.65, "high", 255, 0, 0, 255, 1.2, "center", "center", 255) local VsText = textCreateTextItem("Vs", 0.1, 0.65, "high", 255, 255, 255, 255, 1.2, "center", "center", 255) local PoText = textCreateTextItem("0 Police", 0.15, 0.65, "high", 0, 0, 255, 255, 1.2, "center", "center", 255) textDisplayAddText(Display, CrText) textDisplayAddText(Display, VsText) textDisplayAddText(Display, PoText) CrTable = {} PoTable = {} function updateText() textItemSetText(CrText, #CrTable.." Criminal") textItemSetText(PoText, #PoTable.." Police") end function AddPlayer(player, Table) if not getPlayerTable(player, CrTable) and not getPlayerTable(player, PoTable) then textDisplayAddObserver(Display, player) table.insert(Table, player) setElementData(player, "MissionProtection", true) if Table == CrTable then setPlayerWantedLevel(player, 6) end updateText() end end function RemovePlayer(player, Table) textDisplayRemoveObserver(Display, player) for i, v in ipairs (Table) do if (v == player) then table.remove(Table, i) setElementData(player, "MissionProtection", false) end end updateText() end function getPlayerTable(player, Table) for i, v in ipairs (Table) do if (v == player) then return true end end end addEventHandler("onElementDataChange", root, function(dataName) if dataName == "LegalStatus" and (getPlayerTable(source, CrTable) or getPlayerTable(source, PoTable)) then local LegalStatus = getElementData(source, dataName) if LegalStatus == "Jailed" then if getPlayerTeam(source) ~= getTeamFromName("Police") then RemovePlayer(source, CrTable) elseif getPlayerTeam(source) == getTeamFromName("Police") then RemovePlayer(source, PoTable) end checkForWinner() end end end) setPlayerWantedLevel_ = setPlayerWantedLevel function setPlayerWantedLevel(player, level) local stat = setPlayerWantedLevel_(player, level) if stat then setElementData(player, "WantLvl", level) end return stat end local CrM = createMarker(476.7, -1488.7, 19.2, "cylinder", 2, 255, 0, 0, 150) local PoM = createMarker(474.5, -1509, 19.5, "cylinder", 2, 0, 0, 255, 150) local CrDoor = createObject(1508, 4342.5, -1649.2, 26.4) local PoDoor = createObject(1508, 4253.1, -1652.4, 26.4) createBlip(475.4, -1501.57, 20.5, 32) addEventHandler("onResourceStart", resourceRoot, function() exports ["guimessages"] : outputServer(root, "* Go to the red house!!", 50, 0, 255) exports ["guimessages"] : outputServer(root, "Sniper Mission will begin after 5 minutes!", 255, 50, 0) exports ["guimessages"] : outputServer(root, "*For Gangster : Enter at Red Marker !", 255, 50, 0) exports ["guimessages"] : outputServer(root, "*For Police : Enter at Blue Marker!", 0, 50, 255) standByMission = setTimer(function() moveObject(CrDoor, 3500, 4342.5, -1649.2, 29.4) moveObject(PoDoor, 3500, 4253.1, -1652.4, 29.4) exports ["guimessages"] : outputServer(root, "Sniper Mission Started!!!", 0, 150, 255) setTimer(checkForWinner, 1000, 1, true) end, 5*60*1000, 1) end) function getTimeLeft(Timer) if startTheMission == Timer then ms = getTimerDetails(Timer) + 300000 else ms = getTimerDetails(Timer) end local m = math.floor(ms/60000) local s = math.floor((ms-m*60000)/1000) if m < 10 then m = ""..m end if s < 10 then s = ""..s end return "("..m.." Min and "..s.." Sec)" end addCommandHandler("snipertime", function(player) if isTimer(standByMission) then exports.guimessages:outputServer(player, "Time left before Sniper Mission Start: "..getTimeLeft(standByMission), 0, 255, 0) elseif isTimer(startTheMission) then exports.guimessages:outputServer(player, "Time left before Sniper Mission Start: "..getTimeLeft(startTheMission), 0, 255, 0) else exports.guimessages:outputServer(player, "Sniper Mission is in progress now!", 0, 255, 0) end end) local PolicePosition = { {4233.3, -1644.6, 25.8}, {4233.1, -1653.1, 25.8}, {4232.8, -1662.4, 25.8}, {4239.1, -1666.2, 25.8}, {4239.8, -1655.7, 25.8}, {4241.1, -1645.6, 25.8}, {4244.3, -1653.9, 25.8}, {4246.3, -1665.9, 25.8}, {4240.6, -1655.5, 25.8} } local PoliceOutPosition = { {216.6, 76.57, 1005.2}, {216.3, 80.5, 1005.2}, {219.83, 79.8, 1005.2} } local CriminalPosition = { {4364.8, -1657.7, 25.8}, {4364.3, -1648.5, 25.8}, {4362.5, -1637.6, 25.8}, {4357.4, -1637.4, 25.8}, {4356.8, -1646.3, 25.8}, {4354.4, -1656.1, 25.8}, {4348.2, -1657.5, 25.8}, {4347.4, -1647.1, 25.8}, {4348.1, -1636.9, 25.8} } local CriminalOutPosition = { {486.5, -1492.6, 20.2}, {487.2, -1474.7, 19.2}, {492.6, -1469.85, 18.55}, {489.4, -1464.85, 18.3}, {487.1, -1503.9, 20.4}, {483.1, -1515.1, 20.3}, {489.4, -1526.2, 19.77}, {485.1, -1534.1, 19.4} } addEventHandler("onMarkerHit", root, function(player) if getElementType(player) == "player" and not isPedInVehicle(player) then if isTimer(standByMission) then if source == CrM and getPlayerTeam(player) ~= getTeamFromName("Police") then local x, y, z = unpack(CriminalPosition[math.random(#CriminalPosition)]) setElementPosition(player, x, y, z) AddPlayer(player, CrTable) elseif source == PoM and getPlayerTeam(player) == getTeamFromName("Police") then local x, y, z = unpack(PolicePosition[math.random(#PolicePosition)]) setElementPosition(player, x, y, z) AddPlayer(player, PoTable) end end end end) TopKill = {} function sortTop() sortedTopKill = {} for a, b in pairs(TopKill) do table.insert(sortedTopKill, {getPlayerName(a), b}) end table.sort(sortedTopKill, function(a,b) return a[2] > b[2] end) end addEventHandler("onPlayerWasted", root, function(_, killer) if getPlayerTable(source, CrTable) or getPlayerTable(source, PoTable) then if killer and getElementType(killer) == "player" then exports.guimessages:outputServer(root, getPlayerName(killer).." Killed "..getPlayerName(source).." in Sniper Mission!", 255, 0, 255) TopKill[killer] = (TopKill[killer] or 0) + 1 else exports.guimessages:outputServer(root, getPlayerName(source).." dead in Sniper Mission!", 255, 0, 255) end if getPlayerTeam(source) ~= getTeamFromName("Police") then RemovePlayer(source, CrTable) elseif getPlayerTeam(source) == getTeamFromName("Police") then RemovePlayer(source, PoTable) end end checkForWinner() end) addEventHandler("onPlayerQuit", root, function() if getPlayerTable(source, CrTable) or getPlayerTable(source, PoTable) then if getPlayerTeam(source) ~= getTeamFromName("Police") then RemovePlayer(source, CrTable) elseif getPlayerTeam(source) == getTeamFromName("Police") then RemovePlayer(source, PoTable) end end checkForWinner() end) function checkForWinner(cHk) if cHk then TopKill = {} end if not isTimer(standByMission) and not isTimer(startTheMission) then if #CrTable > 0 and #PoTable == 0 then if not cHk then exports.guimessages:outputServer(root, "The Criminals won the Sniper Mission!", 255, 100, 0) exports.guimessages:outputServer(root, "--| Top Kills of Sniper Mission |--", 255, 255, 0) sortTop() if sortedTopKill[1] then exports.guimessages:outputServer(root, "1. "..sortedTopKill[1][1]..": "..sortedTopKill[1][2], 255, 0, 255) end if sortedTopKill[2] then exports.guimessages:outputServer(root, "2. "..sortedTopKill[2][1]..": "..sortedTopKill[2][2], 255, 0, 255) end if sortedTopKill[3] then exports.guimessages:outputServer(root, "3. "..sortedTopKill[3][1]..": "..sortedTopKill[3][2], 255, 0, 255) end else exports.guimessages:outputServer(root, "The Sniper Mission was Draw!", 255, 0, 0) end for _, p in ipairs (CrTable) do textDisplayRemoveObserver(Display, p) if not cHk then setElementData(player, "Money", (getElementData(player, "Money") + 30000 )) end local x, y, z = unpack(CriminalOutPosition[math.random(#CriminalOutPosition)]) setElementPosition(p, x, y, z) setElementData(p, "MissionProtection", false) end CrTable = {} PoTable = {} updateText() startTheMission = setTimer(function() exports.guimessages:outputServer(root, "* Go to the red house!!", 50, 0, 255) exports.guimessages:outputServer(root, "Sniper Mission will begin after 5 minutes!", 255, 50, 0) exports.guimessages:outputServer(root, "*For Gangster : Enter at Red Marker !", 255, 50, 0) exports.guimessages:outputServer(root, "*For Police : Enter at Blue Marker!", 0, 50, 255) moveObject(CrDoor, 3500, 4342.5, -1649.2, 26.4) moveObject(PoDoor, 3500, 4253.1, -1652.4, 26.4) standByMission =
  18. يا ليل عدلت على المود وخربته ثاني يقولي server:270 near to close
  19. يقول gangs.lua:4004 attempt to get length of local "noa"
×
×
  • Create New...