Jump to content

roaddog

Members
  • Posts

    346
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by roaddog

  1. Idk if this what you want but store it in a table and then use https://wiki.multitheftauto.com/wiki/ToJSON
  2. roaddog

    The last reply

    hahahahhahaha yeah right
  3. you need to create a function to update it. like update the thing when you open the panel for example yeah you dont need to use guiGridListClear if the row always 2 just update the value of that
  4. okayy show me how you add the kill to the table it should be check topKillers[key][1] == name and then topKillers[key][2] = topKillers[key][2] + 1
  5. how your table looks like? tkill = {{"aa", 10}, {"bb", 2}, {"cc", 5}} -- Sort the table from high to low table.sort(tkill, function (a, b) return a[2] > b[2] end) for i, v in pairs(tkill) do print(v[1], v[2]) end -- This will result: -- aa, 10 -- cc, 5 -- bb, 2 function getKeyFromVal(name) if (not name) then return false end for i, v in pairs(tkill) do if (v[1] == name) then return i end end return false end function addkill(name, num) if (not name or not num) then return false end local key = getKeyFromVal(name) tkill[key][2] = tkill[key][2] + num end -- we add 6 kill to the "bb" addkill("bb", 6) -- sort again table.sort(tkill, function (a, b) return a[2] > b[2] end) for i, v in pairs(tkill) do print(v[1], v[2]) end --This will result -- aa, 10 -- bb, 8 -- cc, 5
  6. then you have to call table.sort everytime you add new data
  7. addEventHandler("onMarkerHit", meslekbitis_marker2, meslekbitis) move ^ line to function ikincimeslek(oyuncu) if oyuncu then if isElement(kargo_arac[oyuncu]) then destroyElement(meslekbitis_marker) destroyElement(kargobitis_blips) outputChatBox("#9ACD32[Kargo Mesleği]: #FFFFFFKargoların indirililiyor, ücretiniz almak için kargo dağıtım merkezine geri dön.",oyuncu,255,255,255,true) meslekbitis_marker2 = createMarker(-62.74648, -1111.28027, 1.07812, "checkpoint", 2.5 , 255, 185, 15) addEventHandler("onMarkerHit", meslekbitis_marker2, meslekbitis) end end end
  8. again we cant really assume your file that causing this problem. what resource is that? im not a wizard
  9. bro I’m not wizard but I can sense that you done something (destroyElement probably) upon onVehicleExit or onPlayerVehicleExit trigger. Post the code
  10. yes https://wiki.multitheftauto.com/wiki/AttachElements you just got to play with x, y, z offsets.
  11. roaddog

    Help me !

    Create your own panel with guiStaticImage or via guieditor --Client panel = guiCreateStaticImage( 20, 200, 100, 100, "imagename.png", false) button1 = guiCreateStaticImage( 10, 20, 20, 20, "imagename.png", false, panel) addEventHandler("onClientGUIClick", button1, transportToOne, false) function showTransportPanels() if (not guiGetVisible(panel)) then guiSetVisible(panel, true) showCursor(true) end end addEvent("showTransportPanel", true) addEventHandler("showTransportPanel", root, showTransportPanels) function transportToOne(btn, st) if (btn ~= "left" or st ~= "up") then if (guiGetVisible(panel)) then guiSetVisible(panel, false) showCursor(false) end triggerServerEvent("transportPlayerTo", resourceRoot, 1) end end --Server local playerMarker = createMarker(0, 0, 2, "cylinder", 5, 10, 244, 23, 200, root) function handlePlayerMarker(hitElement, matchingDim) local elementType = getElementType(hitElement) if (elementType ~= "player" or not matchingDim or isPedInVehicle(hitElement)) then return false end triggerClientEvent(hitElement, "showTransportPanel", hitElement) end addEventHandler("onMarkerHit", playerMarker, handlePlayerMarker) function transportPlayerTo(place) if (place == 1) then fadeCamera(client, false, 1) setElementPosition(client, x, y, z) setTimer(fadeCamera, 1000, 1, client, true) end end addEvent("transportPlayerTo", true) addEventHandler("transportPlayerTo", resourceRoot, transportPlayerTo) untested but you can figure it out by yourself
  12. roaddog

    Help me !

    https://wiki.multitheftauto.com/wiki/OnVehicleStartEnter use this and do if (seat == 0) then cancelEvent() outputChatBox("Unable to enter driver seat", player, 255, 25, 25) end
  13. here you got variety of example there’s max velocity too https://wiki.multitheftauto.com/wiki/SetVehicleHandling have a good read
  14. local cPed = createPed(0, x, y, z) function outputPlayerHitByWater(thePed) local attacker = getVehicleOccupant(source) if (thePed == cPed and getElementType(thePed) == "ped") then killPed ( thePed, attacker, 56, 9, false) end end addEventHandler("onClientPedHitByWaterCannon", getRootElement(), outputPlayerHitByWater)
  15. https://wiki.multitheftauto.com/wiki/DxDrawImage https://wiki.multitheftauto.com/wiki/OnClientRender
  16. do this local value = getPlayerMoney(receiver) takePlayerMoney(receiver, value)
  17. roaddog

    [HELP]

    addEvent("car", true) addEventHandler("car", root, function() if isElement(vehicle[source]) then destroyElement(vehicle[source]) end local x, y, z = getElementPosition(source) vehicle[source] = createVehicle(599, x, y, z) --599 is the vehicle's hands. Put any vehicle you want warpPedIntoVehicle(source, vehicle[source]) playerMarker = createMarker(341.64114379883, -1351.6920166016, 14.5078125, "cylinder", 1, 10, 244, 23, 200) addEventHandler("onMarkerHit", playerMarker, handlePlayerMarker) end) function handlePlayerMarker(hitElement) local elementType = getElementType(hitElement) outputChatBox(" Itt tudod fel venni a szolgálatott /dutyonR") outputChatBox("Itt tudod le tenni a szolgálatott /dutyoffR") end
  18. roaddog

    [HELP]

    local thePed = createPed(0, x, y, z) addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld) if (button == "right") and (state == "up") then if isElement(clickedWorld) and clickedWorld == thePed then IsCardShop = not IsCardShop removeEventHandler("onClientRender", root, Panel) if IsCardShop then addEventHandler("onClientRender", root, Panel) end end end end) here
×
×
  • Create New...