-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
الحين ذا كلينت ولا سيرفر؟ الي اشوفه خليط كلينت و سيرفر .__.
-
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)
-
--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)
-
مافيه اي تفاصيل؟ ايش تبي تسوي بالضبط!
-
كامل سيرفر مو نص كلينت نص سيرفر + متغيرات الكلينت ما تجي بالسيرفر و العكس صحيح + المنتات الكلينت ما تجي بالسيرفر
-
انت كذا تجيب التيم و اللون اول ما يشتغل المود المفروض تجيب التيم واللون لما اللاعب يلمس الماركر -- و عموماً يفترض الكود تسونه سيرفر لان بالكلينت محد رح يشوف اللون غير اللاعب الي لمس الماركر
-
vehicle سطر 28 المفروض تحط !انا مدري انت على اي اساس جالس تجيب القيمة الي بالكولمن الثاني و انت اصلا ما حطيت شي بالكولمن الثاني
-
addEventHandler("onClientPlayerDamage", root, function(attacker, weapon, bodypart) if attacker and attacker == localPlayer and source ~= attacker then playSound("hitmarker-sound.wav") end end)
-
You want the damage sound when you damage other player or when you get damaged by other player?
-
Make sure you have the code on client side not server side.
-
ما فهمت شي بدون الكود ما نقدر نفيدك، حط الكود خلنا نشوف وش مسوي ينقل إلى قسم البرمجة
-
من الزر هذا تقدر تحط الأحداثيات و رقم الأنتيرو و تضغط على زر و يسوي لك وارب
-
الموضوع ما يخص ام تي اي ولا له اي علاقة بأم تي اي، مشاكلكم الخاصة حلوها بمكان آخر غير منتدى ام تي اي تم حذف جميع الردود لأحتوائها على اهانات تجاه الأعضاء الآخرين يغلق
-
ايش هذا! مدري اضحك ولا ابكي !إذا ما تعرف تحط اسم لسيرفرك معناتها الأفضل لا تفكر تفتح سيرفر من اساس
-
فاتح الف موضوع لنفس الكود؟ كمل بموضوعك الاول! يغلق
-
'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
-
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.
-
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.
-
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)
-
triggerServerEvent("shotgun", localPlayer) giveWeapon( source, 27, 100 ) or giveWeapon( client, 27, 100 )
