Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. الحين ذا كلينت ولا سيرفر؟ الي اشوفه خليط كلينت و سيرفر .__.
  2. window = guiCreateWindow(494, 228, 275, 367, "Cars", false) guiWindowSetSizable(window, false) guiSetVisible (window, false) guiSetAlpha(window, 1) local gridlist = guiCreateGridList(10, 32, 255, 217, false, window) guiGridListAddColumn(gridlist, "Cars", 0.9) guiGridListAddColumn(gridlist, "$", 0.79999) guiSetProperty(window, "NormalTextColour", "FFFF0000") local button2 = guiCreateButton(61, 259, 152, 36, "Use", false, window) guiSetFont(button2, "default-bold-small") guiSetProperty(button2, "NormalTextColour", "FFFF0000") local button = guiCreateButton(61, 305, 152, 36, "Close", false, window) guiSetFont(button, "default-bold-small") guiSetProperty(button, "NormalTextColour", "FFFF0000") car = { {443, 25000}, {490, 20000}, {528, 15000}, {596, 1000}, {598, 1000}, {597, 1000}, {599, 1000}, } for _, vehicle in ipairs(car) do local row = guiGridListAddRow(gridlist) guiGridListSetItemText(gridlist, row, 1, vehicle[1], false, true) guiGridListSetItemText(gridlist, row, 2, vehicle[2], false, true) end addEventHandler("onClientGUIClick", guiRoot, function() if source == button2 then local sRow = guiGridListGetSelectedItem(gridlist) if sRow and sRow ~= -1 then local carID = tonumber(guiGridListGetItemText(gridlist, sRow, 1)) local carCost = tonumber(guiGridListGetItemText(gridlist, sRow, 2)) if carID and carCost and getPlayerMoney() >= carCost then triggerServerEvent("carx", localPlayer, carID, carCost) guiSetVisible(window, false) showCursor(false) end end elseif source == button then guiSetVisible(window, false) showCursor(false) end end) addEventHandler("onClientGUIDoubleClick", gridlist, function() local sRow = guiGridListGetSelectedItem(source) if sRow and sRow ~= -1 then local carID = tonumber(guiGridListGetItemText(gridlist, sRow, 1)) local carCost = tonumber(guiGridListGetItemText(gridlist, sRow, 2)) if carID and carCost and getPlayerMoney() >= carCost then triggerServerEvent("carx", localPlayer, carID, carCost) guiSetVisible(window, false) showCursor(false) end end end, false) ------------------------------- local marcar = createMarker(2490.937, -1658.38, 12.352, "cylinder", 4, 255, 210, 255, 110) addEventHandler("onClientMarkerHit", marcar, function(hitPlayer) if (hitPlayer == localPlayer) then guiSetVisible(window, true) showCursor(true) end end)
  3. --Client Side-- addEventHandler("onClientGUIClick", resourceRoot, function() if source == warpt2 then triggerServerEvent("warp1", localPlayer) end end) --Server Side-- addEvent("warp1", true) addEventHandler("warp1", root, function() for i, player in ipairs(getElementsByType("player")) do if player ~= client then local team = getPlayerTeam(player) if team and getTeamName(team) == "Mafia" then setElementDimension(player, 0) setElementInterior(player, 0) setElementPosition(player, -2686.134, 1867.064, 1318.48) end end end end)
  4. مافيه اي تفاصيل؟ ايش تبي تسوي بالضبط!
  5. TAPL

    طلب

    كامل سيرفر مو نص كلينت نص سيرفر + متغيرات الكلينت ما تجي بالسيرفر و العكس صحيح + المنتات الكلينت ما تجي بالسيرفر
  6. TAPL

    طلب

    انت كذا تجيب التيم و اللون اول ما يشتغل المود المفروض تجيب التيم واللون لما اللاعب يلمس الماركر -- و عموماً يفترض الكود تسونه سيرفر لان بالكلينت محد رح يشوف اللون غير اللاعب الي لمس الماركر
  7. TAPL

    طلب

    من وين جايب سورس بسطر 4
  8. vehicle سطر 28 المفروض تحط !انا مدري انت على اي اساس جالس تجيب القيمة الي بالكولمن الثاني و انت اصلا ما حطيت شي بالكولمن الثاني
  9. TAPL

    Damage sound

    addEventHandler("onClientPlayerDamage", root, function(attacker, weapon, bodypart) if attacker and attacker == localPlayer and source ~= attacker then playSound("hitmarker-sound.wav") end end)
  10. TAPL

    Damage sound

    You want the damage sound when you damage other player or when you get damaged by other player?
  11. TAPL

    Damage sound

    Make sure you have the code on client side not server side.
  12. ما فهمت شي بدون الكود ما نقدر نفيدك، حط الكود خلنا نشوف وش مسوي ينقل إلى قسم البرمجة
  13. من الزر هذا تقدر تحط الأحداثيات و رقم الأنتيرو و تضغط على زر و يسوي لك وارب
  14. الموضوع ما يخص ام تي اي ولا له اي علاقة بأم تي اي، مشاكلكم الخاصة حلوها بمكان آخر غير منتدى ام تي اي تم حذف جميع الردود لأحتوائها على اهانات تجاه الأعضاء الآخرين يغلق
  15. ايش هذا! مدري اضحك ولا ابكي !إذا ما تعرف تحط اسم لسيرفرك معناتها الأفضل لا تفكر تفتح سيرفر من اساس
  16. فاتح الف موضوع لنفس الكود؟ كمل بموضوعك الاول! يغلق
  17. TAPL

    Damage sound

    'onClientWeaponFire' playSound onClientWeaponFire is for custom weapons only, also he asked for damage which mean he need onClientPlayerDamage, not going to script instead of you ofc, learning is from this way: https://wiki.multitheftauto.com/wiki/Scripting_Introduction
  18. TAPL

    Hydra timer

    onVehicleWeaponFire isn't mta native event, it's from useful function and this event cannot be cancelled. @Wumbaloo, getPedOccupiedVehicle return vehicle element, not string with vehicle name. @-Lemonade-, you will need toggleControl to disable the controls vehicle_fire and vehicle_secondary_fire when a player shoot from hydra and re-enable them after 5 secs.
  19. TAPL

    [HELP] | Warps?

    At line 51 and 53 the source is a button as you've used if statement at line 50 to make sure it a button, you should replace source with your grid list variable on line 51 and 53.
  20. Try this. function dxDrawLoading(x, y, width, height, x2, y2, size, color, color2, color3, loadText, second, police, start, now) local seconds = second local with = interpolateBetween(0,0,0,width,0,0, (now - start) / ((start + tonumber(seconds)) - start), "Linear") local text = interpolateBetween(0,0,0,100,0,0,(now - start) / ((start + tonumber(seconds)) - start),"Linear") dxDrawText ( loadText.."... "..math.floor(text).."%", x2, y2+1 , width, height, color3, size, police ) dxDrawRectangle(x, y ,width ,height -10, color) dxDrawRectangle(x, y, with ,height -10, color2) end sx, sy = guiGetScreenSize() function drawLoad2() local saTeam = getPlayerTeam(getLocalPlayer()) local r, g, b = getTeamColor(saTeam) local now = getTickCount() exports["Scripts"]:dxDrawLoading(196*sx/800, 482*sy/600, 422*sx/800, 25*sy/600, 196*sx/800, 450*sy/600, 1.00*sx/800, tocolor(0,0,0,120), tocolor(r,g,b,255), tocolor(r,g,b,255), "Démarrage", 7000, "pricedown", start, now) if start <= now - 7000 then removeEventHandler("onClientRender", root, drawLoad2) end end addCommandHandler("startloading", function() addEventHandler("onClientRender", root, drawLoad2) start = getTickCount() end)
  21. triggerServerEvent("shotgun", localPlayer) giveWeapon( source, 27, 100 ) or giveWeapon( client, 27, 100 )
×
×
  • Create New...