Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 15/08/19 in all areas

  1. Can you guys tell me how this is supposed to work? Using server-side functions at client-side. What you should do is collect them in table, and send with trigger to client.
    2 points
  2. OK so after many requests from people asking me to install discord bots to their servers I have decided to make the simplest tutorial on setting up a bot for your servers. [NOTE]: THIS IS A VPS TUTORIAL. IF YOUR SERVER ISN'T RUNNING ON A VPS THIS WILL NOT WORK FOR YOU UNLESS YOU UNDERSTAND HOW NODE.JS WORKS. Part 1: Bot creation Part 2: Files Configuration Part 3: SSH commands That should be all now go have fun annoying players in your server. Some feedback would be appreciated Good luck
    1 point
  3. أهااا فهمت عليك الحين يعني مشكلتك مع الدائره نفسها مو مع الكود المشكله اني ما اعرف للشادر وهو الشي الوحيد اللي معرقلني في اللعبه دور على كود شادر في المواقع وهذي كلمات دلاليه تساعدك في البحث HLSL, Shaders DirectX9 أدري صعب تفهمها بس مافيه شرح في الويكي للأسف وقليل تحصل ناس تفهم في الشادر
    1 point
  4. يب شادر أعرف السكربت ذا , راح تكون جودة الدائره شوي مو كويسه بس بضبطها واعطيك
    1 point
  5. مهابل مفردها مهبل , وتعني الرائد ولها معاني كثيرة مع اختلاف موقع الحركات
    1 point
  6. العفو ، i = index v = value في كل جدول دائماً فيه الفهرس والقيمة الفهرس هو ال index من خلاله تقدر تجيب القيمة والقيمة هي ال value مثال myTable = { [1] = "Hello", } بالمثال الي فوق index = 1 value = "Hello" ولو مثلا سويت myTable[1] راح ترجع لك "Hello" عشانها تشتغل زي شغل الفهرس فـ الكتب بالضبط ملاحظة: الفهرس مو لازم يكون رقم ، ممكن تحط اي قيمة في بالك وطبعاً الحين راح تسال طيب ليش فيه بعض الجداول مافيها فهرس مثل myTable = {"Hello"} الجواب هو فيه فهرس لكنه غير مكتوب ، ، ولو سويت نفس الخطوة الي فوق myTable[1] راح ترجع لك برضو "Hello" وبالنسبة لسؤالك السابق عن _, v البعض يحب يحط _ بدل اي حرف ثاني ، عادي مالها اهمية اتمنى وصلت الفكرة
    1 point
  7. الخطئ الاول والثاني يقولك انه screenX1 مب متعرفة وفعلاً انا مو شايفها فـ كودك الخطئ الثالث والرابع مو واضح بالصورة حقك لكن الي قاعد اشوفه انك مكرر اسم الفنكشن فـ كل مكان تقريباً وبالتالي الكود راح ياخذ اخر متغير بالاسم ذا وبذي الحالة هو MyCross = dxDrawImage(screenX1-(size/2), screenY1-(size/2), size, size, "images/"..GetCrossHair), tocolor(255,255,255,255) وليس الفنكشن انصحك تحط اسم مختلف لكل متغير بدل الي مسويه ذا
    1 point
  8. Both posts above mix server-only functions with client-only functions. Smh. --server function refreshListAdmin() local onlineAdmins = {} for i, v in ipairs(getElementsByType("player")) do if hasObjectPermissionTo(v, "function.setPlayerMuted", true) then table.insert(onlineAdmins, getPlayerName(v)) end end triggerClientEvent(client, "receiveListAdmin", client, onlineAdmins) end addEvent("refreshListAdmin", true) addEventHandler("refreshListAdmin", root, refreshListAdmin) --client WINDOW_WITH_GRIDLIST = guiCreateWindow(...) GRIDLIST = guiCreateGridList(...) guiGridListAddColumn(GRIDLIST, "Admin Name", 0.85) function showListAdmin() if guiGetVisible(WINDOW_WITH_GRIDLIST) then guiSetVisible(WINDOW_WITH_GRIDLIST, false) -- hide the window if it's already visible return end guiGridListClear(GRIDLIST) guiGridListAddRow(GRIDLIST, "Loading...") -- add a row that says "Loading..." while waiting for server to return the admins list guiSetVisible(WINDOW_WITH_GRIDLIST, true) triggerServerEvent("refreshListAdmin", localPlayer) end addCommandHandler("admins", showListAdmin) function loadListAdmin(admins) if not guiGetVisible(WINDOW_WITH_GRIDLIST) then return -- don't continue if the user already closed the window end guiGridListClear(GRIDLIST) -- clear out the "Loading..." row if #admins > 0 then for k, v in pairs(admins) do guiGridListAddRow(GRIDLIST, v) end else guiGridListAddRow(GRIDLIST, "No admins online.") end end addEvent("receiveListAdmin", true) addEventHandler("receiveListAdmin", root, loadListAdmin) You'll need to incorporate this code into your existing code. Specifically, plug in the proper variables for your GUI window and gridlist.
    1 point
  9. 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)
    1 point
  10. Bom, o que de cara você vai precisar é de: https://wiki.multitheftauto.com/wiki/CreateElement https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/GetElementData
    1 point
  11. You were helpful AF, bro Keep up the good work! @Hugos Use the getElementSpeed function from WIKI to get the current speed. It works quite well. For the arrow of the speedometer: You know that the speedo can show 260 max. You know the degree for the 0 on the speedo and the degree for 260. Now you can divide the current speed of the vehicle by 260 and then you get the relative number to multiply the degrees with. So like: local arrowRotation = 0; -- This will be the actual rotation of the arrow. local vehicleSpeed = 180; -- This will serve as the current speed of your vehicle. You get this with getElementSpeed local speedoMaxSpeed = 260; local degreesFromZeroToMax = 180; -- This is the degrees between 0 and 260 for example arrowRotation = (vehicleSpeed/speedoMaxSpeed)*degreesFromZeroToMax; I hope it works. It's been a long time since I made something like this. About dx. Yup! You HAVE to use dx for this.
    1 point
  12. Sim. engineLoadDFF engineReplaceModel
    1 point
  13. عليكم السلام في كثيير استخدامات للجداول تقدر تضيف احداثيات ومعلومات لجدول local markers = { {758.51599121094,753.36242675781,-4.0033869743347,"cylinder",1}, {470.33850, 810.26843, -9.91448,"arrow",2} } بعدين نسوي امؤ يصنع كل الماركرات ذي ب اسم واحد ! for _,v in pairs (markers) do MarkerName = createMarker(v[1],v[2],v[3],v[4],v[5],255,255,255,255) end --v[1] والقيم الانيه ياخذها من الجدول والخ كلها نفس العمليه الحين في سؤال بيطرح نفسه وش الفرق ؟ ليش م اسوي createMarker وخلاص؟ ليش اسوي جدول و الحوسه ذي لماركرات ؟ الفائده انه تقدر تخفي كل الماركراتت ب كزد زاحد destroyElement(MarkerName) -- يشيل كل الماركرات الي تصنعت من الجدول.. ذا مثال تقدر تطبقه عكل شي ! وفي امثله كثير مثلا تسوي جدول فاضي و تضيف ناس عليه و تشيلهم والخ ذا موضوع تاني لو تحب اشرحه لك خبرني اتتمنا تعليقي يفيدك #بسام_سوريا
    1 point
  14. بالتوفيق ملحوظه ( جيب مفرد كلمه مهابل ) و اعرف معناها
    1 point
  15. --client if ( source == Button[44] ) then local message = guiGetText ( editAdmin ) if message == "" then playSoundFrontEnd(2) return end triggerServerEvent ( "SendMessage" , localPlayer , message ) end addEvent ( "ReciveMessage" , true ) addEventHandler ( "ReciveMessage" , root , function ( message , Name ) local servertime = getRealTime ( ) local hours , minutes , second = servertime.hour , string.format ( "%02d" , servertime.minute ) , string.format ( "%02d" , servertime.second ) guiSetText ( memo_admin , guiGetText ( memo_admin ) .. "[" .. hours .. ":" .. minutes .. ":" .. second .. "] " .. Name .. ": " .. message .. "\n" ) guiSetText ( editAdmin , "" ) end end ) -- # Server side addEvent ( "SendMessage" , true ) addEventHandler ( "SendMessage" , root , function ( Message ) for _ , Player in pairs ( getElementsByType ( "player" ) ) do triggerClientEvent ( Player , "ReciveMessage" , Player , Message , getPlayerName ( source ) ) end end )
    1 point
  16. send the message to server side by using triggerServerEvent and then send it back to the client side --client if ( source == Button[44] ) then local message = guiGetText ( editAdmin ) if message == "" then playSoundFrontEnd(2) return end triggerServerEvent ( "SendMessage" , localPlayer , message ) end addEvent ( "ReciveMessage" , true ) addEventHandler ( "ReciveMessage" , root , function ( message ) local name = getPlayerName ( localPlayer ) local servertime = getRealTime ( ) local hours , minutes , second = servertime.hour , string.format ( "%02d" , servertime.minute ) , string.format ( "%02d" , servertime.second ) guiSetText ( memo_admin , guiGetText ( memo_admin ) .. "[" .. hours .. ":" .. minutes .. ":" .. second .. "] " .. getPlayerName ( localPlayer ) .. ": " .. message .. "\n" ) guiSetText ( editAdmin , "" ) end end ) -- # Server side addEvent ( "SendMessage" , true ) addEventHandler ( "SendMessage" , root , function ( Message ) for _ , Player in pairs ( getElementsByType ( "player" ) ) do triggerClientEvent ( Player , "ReciveMessage" , Player , Message ) end end )
    1 point
  17. Não se esqueça de deixar um Thanks nas respostas que lhe ajudaram.
    1 point
  18. You must use: setElementInterior instead of setElementPosition, like this: function motel (thePlayer) setElementInterior ( thePlayer, 0, 2216.3332844, -1150.5032888, 1025.732323227 ) outputChatBox ( "O player ".. getPlayerName(thePlayer) .." Foi para o Motel Vá tambem (/motel)", root, 0, 255, 0 ) end addCommandHandler ( "motel", motel ) Change: '0' to the interior ID of your map.
    1 point
×
×
  • Create New...