Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. TAPL

    Data

    If the data does not exists it will show 0, if the player not in the server anymore it will show N/A. Nothing else.
  2. Server Side: marker = createMarker(1219,-1812,13, "cylinder" , 4.0, 255, 255, 0, 170) blip = createBlipAttachedTo(marker, 55) addEventHandler("onMarkerHit", marker, function(hitElement) if getElementType(hitElement) == "vehicle" then blowVehicle(hitElement) end end)
  3. vehicles = {} function spawnVehiclee(myPlayer) if (not vehicles[myPlayer]) then vehicles[myPlayer] = {} end local x,y,z = getElementPosition(myPlayer) local car = createVehicle(560, x, y, z) table.insert(vehicles[myPlayer], car) if (#vehicles[myPlayer] > 5) then destroyElement(vehicles[myPlayer][1]) table.remove(vehicles[myPlayer], 1) end warpPedIntoVehicle(myPlayer, car) outputChatBox("Vehicle Spawned", myPlayer, 0, 255, 0, true) setVehicleLocked(car, true) end addCommandHandler("vehCar", spawnVehiclee)
  4. TAPL

    Data

    Show me where you have set the element data.
  5. Try this and let me know if it worked. Client Side: addEventHandler("onClientVehicleDamage", root, function(attacker) if attacker and getElementType(attacker) == "player" then local driver = getVehicleController(source) if driver then local attackerTeam = getPlayerTeam(attacker) local driverTeam = getPlayerTeam(driver) if attackerTeam and driverTeam and attackerTeam == driverTeam then cancelEvent() end end end end)
  6. TAPL

    Data

    Did you realize that you have used 3 arguments for the function getPlayerFromName? local hunt = getPlayerFromName(guiGridListGetItemData(source),guiGridListGetSelectedItem(source),1) And there more errors. Try this: function Players() guiGridListClear(GridList) for i, player in ipairs (getElementsByType ("player")) do local row = guiGridListAddRow(GridList) local Player1 = getPlayerName(player) local Player2 = string.gsub(Player1, "#%x%x%x%x%x%x", "") guiGridListSetItemText(GridList, row, 1, Player2, false, false) guiGridListSetItemData(GridList, row, 1, Player1) end end addEventHandler("onClientResourceStart", resourceRoot, Players) addEventHandler("onClientGUIClick", resourceRoot, function() if (source == GridList) then local row, col = guiGridListGetSelectedItem(source) if (row ~= -1) then local player = getPlayerFromName(guiGridListGetItemData(source, row, 1)) if player then local data = getElementData(player, "Hunters") or 0 guiSetText(hunter, "Total Hunters: "..data) else guiSetText(hunter, "Total Hunters: N/A") end end end end)
  7. function createcooking(x, y, z) marker = createMarker(x, y+1, z, "cylinder", 1) addEventHandler("onMarkerHit", marker, onmarker) end addEvent("createCook", true) addEventHandler("createCook", root, createcooking) function onmarker(player) if getElementType(player) == "player" then triggerClientEvent("onCook", root, player) end end
  8. Timer = {} local col = createColCuboid(x, y, z, width, depth, height) addEventHandler("onColShapeHit", col, function(hitElem) if getElementType(hitElem) == "player" then local team = getPlayerTeam(hitElem) if team and getTeamName(team) ~= "No Team" then if isTimer(Timer[hitElem]) then killTimer(Timer[hitElem]) Timer[hitElem] = nil end outputChatBox("You have to leave this place in 15 secs.", hitElem, 255, 0, 0) Timer[hitElem] = setTimer(function(hitElem) killPed(hitElem) Timer[hitElem] = nil end, 15000, 1, hitElem) end end end) addEventHandler("onColShapeLeave", col, function(leaveElem) if getElementType(leaveElem) == "player" then outputChatBox("You have left this area.", leaveElem, 0, 255, 0) if isTimer(Timer[leaveElem]) then killTimer(Timer[leaveElem]) Timer[leaveElem] = nil end end end) addEventHandler("onPlayerQuit", root, function() if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end end)
  9. تحط المتغير الخاص بالأوبجيكت
  10. https://forum.multitheftauto.com/viewtopic.php?f=91&t=56958
  11. dx هذا مو قريد لست هذا مسوينه ب
  12. هات صورة
  13. ما يصير تحط بالقريد لست اكثر من لون واحد guiGridListSetItemColor
  14. جربت الكود اللاعبين يرجعون -_-"
  15. يعطيك العافية تابل بس بغيت اسالك يالغالي لما اكتب بالبحث ويطلع لي اسم الاعب وارجع امسح الايديت مايرجعو الاعبين , يسير فاضي الايديت وش اسوي عشان اخليه يرجع ؟ ترجع؟ Search ... تقصد تبي كلمة
  16. getVehicleHandling -- maxVelocity
  17. onClientGUIChanged غير الأفنت إلى إذا ما كنت ضايفه column لا تنسى تضيف ال guiGridListAddColumn
  18. TAPL

    Event

    فيه طريقتين فقط onClientGUIClick الأسهل تسوي ليبل مثلاً في نفس مكان الدي اكس و تخلي الليبل فاضي ما تكتب فيه شي و تستخدم معه الأفنت أو و تتحقق من احداثيات الضغطة بالشاشة ان كانت في نفس مكان الدي اكس onClientClick تستخدم الأفنت
  19. TAPL

    طلب

    الكود من برمجتي, من ضمن المودات الي تسرب من جراند العرب يعني عن جد قوة عين كود مسروق و جاي تطلب له مساعدة بعد لو انك جنبي بس ههههه
  20. الترتيب للسيرفرات على حسب الأقدمية و ماله علاقة بعدد اللاعبين يعني كل مره تغير استضافة سيرفرك بيتغير معه الآي بي و البورت و سيرفرك بيروح بآآآخر القائمة او ممكن تكون محظوظ و يكون الآي بي و البورت مستخدم من قبل و يكون سيرفرك فوق او على الأقل بالوسط
  21. addEventHandler("onReadData",calledByReadData) Should be: addEventHandler("onReadData", root, calledByReadData) And here you must use sendTo argument or it will be root by default which mean it will send the data to all clients. triggerClientEvent("onReadData",rootElement,playerDatas) I'll assume that the player you want send to him the data is source: triggerClientEvent(source, "onReadData", root, playerDatas)
  22. https://forum.multitheftauto.com/viewtopic.php?f=148&t=38203#p393074 You can find some code here: https://forum.multitheftauto.com/viewtopic.php?f=91&t=74479
  23. TAPL

    HELP!

    We don't give support with leaked scripts.
×
×
  • Create New...