Jump to content

HassoN

Members
  • Posts

    636
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by HassoN

  1. Yeah I meant without a space in the name itself not between restart and the name. So you restarted it and the marker did not appear? Uhmm try to change type="map" to type="script" in your meta, maybe because it is a map so your Lua file is not introduced?
  2. Open your console and type restart map name (without space)
  3. Everything seems fine to me. What's the exact issue? Does the marker get created in the first place? Or is it only that if you enter nothing happens? Type /debugscript 3 then restart the resource and tell me if you face any error messages
  4. Show me your meta file.
  5. Try this local markers = {} function bagaznik(player) veh = getPedOccupiedVehicle(player) if (not isElement(veh) then return false end if getVehicleDoorOpenRatio(veh, 1) > 0 then setVehicleDoorOpenRatio(veh, 1, 0) if (markers[veh]) then removeEventHandler("onMarkerHit", markers[veh], sprawdzstan) destroyElement(markers[veh]) end return true end tires = getElementData(veh, "trunkTires") if (tires) then return false end setElementData(veh, "trunkTires", true) x,y,z = pozycja(veh, 0, -3, -1) markers[veh] = createMarker (x, y, z, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler("onMarkerHit", markers[veh], sprawdzstan) setVehicleDoorOpenRatio(veh, 1, 1) end addCommandHandler("trunk",bagaznik) What I have changed: 1- I made it so if you use /trunk then it will open trunk if it is closed and do create a marker (which I made it in a table instead of your variable so you can easily destroy your marker afterwards) and if you use /trunk and the trunk is opened, so it will close and destroy the marker (I assumed that you want to do that, if not just remove that line) 2- Changed your method of if statement to another one which is simpler to read.
  6. Then use 2 different functions function countPlayersInClan(clan) local q = executeSQLQuery("SELECT * FROM clan_members WHERE clan=?",clan) return #q end function countLeadersInClan(clan) local q = executeSQLQuery("SELECT * FROM clan_leaders WHERE clan=?",clan) return #q end function callMeMaybe() local tbl = {} local q = executeSQLQuery("SELECT * FROM clans") for i,v in ipairs(q) do local query = executeSQLQuery("SELECT username FROM accountUsername WHERE account=?",v.owner) local clan = v.name local tag = v.tag local r = v.r local g = v.g local b = v.b local members = countPlayersInClan(clan) local leaders = countLeadersInClan(clan) table.insert(tbl,#tbl+1,{owner=query[1].username:gsub("%[.*%]", ""),name=clan,tag=tag,r=r,g=g,b=b,members=members,leaders=leaders})
  7. local members = countPlayersInClan(clan) local leaders = countPlayersInClan(clan) How are you using the same code twice for two different purposes? Does your database have any information about member's ranks? local q = executeSQLQuery("SELECT * FROM clan_leaders WHERE clan=?",clan) this should work ONLY IF you had a table called "clan_leaders" that actually has a list of all the leaders of a certain clan.
  8. افتح سيرفر ريس DM / DD موداتها ياكثرها على النت
  9. I wouldn't recommend that because if you restart your script everything will be gone.
  10. Ugh, it has been a while since the last time I played MTA, thanks for the information
  11. You add the script to the map folder? What do you mean by that? You must create a .Lua file and introduce it to the meta in order to get it to work. Also at your timer, you are using 1 as a time interval while the minimum is 50.
  12. You need a saving system to save all the banned countries/serials, I'd recommend using SQL functions for that. dbConnect dbExec dbPoll dbQuery And to prevent them from joining you need onPlayerConnect -- when player connects getPlayerSerial -- check if that player has access by his serial or not getPlayerCountry -- I believe this function can be found in the default admin panel cancelEvent -- if that X player doesn't have access.
  13. HassoN

    Money Dirt

    What do you mean by 'dirty money'?
  14. مو شايف فنكشن isValidPower وبعدين كيف بتستعمل الفنكشن حق السيرفر ذا؟ ما اشوف له اي استعمال انصحك تحط الكوماند هاندلر ف جهة سيرفر وتتحقق هناك انه ادمن بعدها ترسل لجهة كلنت ، الي مسويه حالياً غلط
  15. الدائرة ذي صورة؟ لو صورة عدلها بالفوتوشوب وبالنسبة لطلبك ، ارجع استعمل كودك الاصلي وحاول تعدل بال startAngle, stopAngle لين مايوصل للشكل الي يعجبك
  16. تبغاها تتحرك كامل وبعدها توقف يعني؟ وريني مثال مو فاهم منك شي
  17. امسك ذي الصورة وحطها مع الكود ذا local x, y = guiGetScreenSize() local rotation = 0 function renderMyCircle() if (rotation >= 360) then rotation = 0 end rotation = rotation + 1 dxDrawImage(x/2, y-y/10, 70, 70, "circle.png", rotation, 0, 0, tocolor(255, 255, 255, 255), false) end addEventHandler("onClientRender", root, renderMyCircle)
  18. العفو ، حياك الله
  19. HassoN

    سؤال

    العفو ، i = index v = value في كل جدول دائماً فيه الفهرس والقيمة الفهرس هو ال index من خلاله تقدر تجيب القيمة والقيمة هي ال value مثال myTable = { [1] = "Hello", } بالمثال الي فوق index = 1 value = "Hello" ولو مثلا سويت myTable[1] راح ترجع لك "Hello" عشانها تشتغل زي شغل الفهرس فـ الكتب بالضبط ملاحظة: الفهرس مو لازم يكون رقم ، ممكن تحط اي قيمة في بالك وطبعاً الحين راح تسال طيب ليش فيه بعض الجداول مافيها فهرس مثل myTable = {"Hello"} الجواب هو فيه فهرس لكنه غير مكتوب ، ، ولو سويت نفس الخطوة الي فوق myTable[1] راح ترجع لك برضو "Hello" وبالنسبة لسؤالك السابق عن _, v البعض يحب يحط _ بدل اي حرف ثاني ، عادي مالها اهمية اتمنى وصلت الفكرة
  20. الخطئ الاول والثاني يقولك انه screenX1 مب متعرفة وفعلاً انا مو شايفها فـ كودك الخطئ الثالث والرابع مو واضح بالصورة حقك لكن الي قاعد اشوفه انك مكرر اسم الفنكشن فـ كل مكان تقريباً وبالتالي الكود راح ياخذ اخر متغير بالاسم ذا وبذي الحالة هو MyCross = dxDrawImage(screenX1-(size/2), screenY1-(size/2), size, size, "images/"..GetCrossHair), tocolor(255,255,255,255) وليس الفنكشن انصحك تحط اسم مختلف لكل متغير بدل الي مسويه ذا
  21. 1) لو بتسويها بطريقتك ذي ، برضو لازم شوية حسابات عشان تعرف تخلي الدائرة ذي تلف ، لازم تقعد تضيف كل شوية على الـ startAngle + stopAngle بصورة تبان كانها تلف و بـ انسيابية 2) حتى طريقتك ذي مابتجي على كل الشاشات طبعاً ، فـ ذي مو نقطة ايجابية لطريقتك dxDrawImage ولو جينا نسوي صورة تلف اسهل بالف مرة من الفنكشن ذا عشان فيه ارقمنت خاص لل روتيشن بالـ حاول تسوي اي شي وبساعدك فيه ان شاء الله
  22. بدل هل تعقيد واخرتها يطلع شكلها مب حلو ، جيب صورة دائرة وخليها تلف اسهل بالف مرة
  23. local isClosed = false -- لاتلسمها local speed = 0.05 -- تحكم بسرعة تحرك ال dx function panel() if (progress < 1 or variable < 0) then progress = progress + variable end if (progress <= 0) then removeEventHandler("onClientRender", root, panel) progress = 0 end cX, cY, cX = interpolateBetween(0, 0, 0, 0, -30, 0, progress, "Linear") dxDrawRectangle(0, cY + 600, 1280, 155, tocolor(0, 0, 0, 171), false) end function test() if (isClosed == false) then progress = 0 variable = speed isClosed = true addEventHandler("onClientRender", root, panel) return true end if (isClosed == true) then variable = -speed isClosed = false return true end end bindKey("F2", "down", test)
  24. تصحيح لكودك local progress = 0 -- لاتلسمها local speed = 0.05 -- تحكم بسرعة تحرك ال dx function panel() progress = progress + speed cX, cY, cX = interpolateBetween(0, 0, 0, 0, -30, 0, progress, "Linear") dxDrawRectangle(0, cY + 600, 1280, 155, tocolor(0, 0, 0, 171), false) end function test() if removeEventHandler("onClientRender", root, panel) then removeEventHandler("onClientRender", root, panel) progress = 0 else addEventHandler("onClientRender", root, panel) end end bindKey("F2", "down", test) بصورة سلسة dx الفنكشن ذا بـ اختصار يجيب لك قيمة رقم بين مسافتين ، مدري كيف اشرحها بالضبط لكن استخدامها الاساسي عشان تسوي انميشن وتمشي
  25. HassoN

    سؤال

    العفو طريقة اسهل من انك تجيب كل ماركرات السيرفر وتوجع راسك local markers = { {758.51599121094,753.36242675781,-4.0033869743347,"cylinder",1}, {470.33850, 810.26843, -9.91448,"arrow",2}, } local myTable = {} for i, v in ipairs (markers) do myTable[i] = createMarker(v[1], v[2], v[3], v[4], v[5], 255, 255, 255, 255) end -- ولما تجي تمسحهم for _, v in ipairs(myTable) do destroyElement(v) end بالنسبة لصاحب الموضوع ، الهدف الاساسي من الجداول هو حفظ المعلومات بكمية كبيرة وبترتيب معين عشان تستفاد منها حسب استعمالك
×
×
  • Create New...