Jump to content

Search the Community

Showing results for tags 'please help!'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 3 results

  1. Hello! Need some help. I'm writing a work script and it doesn't work because if you go into the delivery spot, the car freezes. Because now the car just goes through the marker --Client side local Storage = {false, false} local deliveryspot = {false, false} local FinishJob = {false, false} local DPoint = { [1] = {1648, -2249, 13},---airport -> Repülőtér [2] = {2190, -2266, 13},---docks -> Dokkok [3] = {1369, -1889, 13},---Verdant Bluffs LS [4] = {1043, -1872, 13}, [5] = {857, -1365, 13}, } local Anyagok = { [1] = {"Fém"}, [2] = {"Deszka"}, [3] = {"Vas rúd"}, [4] = {"Nikecell"}, } function WorkStart() Storage[1] = createMarker(2784, -2455, 13, "cylinder", 10, 10, 160, 0) Storage[2] = createBlip(2784, -2455, 13, 51, 40, 160, 0, 0) outputChatBox("#1db8b5[Munka]#549c6bMenj el a raktárba és vedd fel rendelést", 0, 0, 0, true) end addEventHandler("onClientVehicleEnter", root, function (thePlayer, seat) if (source == getElementData(localPlayer, "Jobveh")) then if (seat == 0) then if not (Storage[1]) then WorkStart() end if not (FinishJob[1]) then FinishJob[1] = createMarker(2745, -2431, 13, "cylinder", 10, 20, 160, 10) FinishJob[2] = createBlip(2745, -2431, 13, 11, 2, 51, 10, 0, 0, 0, 255) end end end end ) addEventHandler("onClientMarkerHit", resourceRoot, function(hitPlayer, mDim) if (mDim) then if (source == Storage[1]) then if (hitPlayer == localPlayer) then local vehicle = getPedOccupiedVehicle(hitPlayer) if (vehicle) then if (vehicle == getElementData(hitPlayer, "Jobveh")) then setElementFrozen(localPlayer,true) setElementFrozen(vehicle, true) setTimer(function() setElementFrozen(vehicle, false) setElementFrozen(localPlayer, false) destroyElement(Storage[1]) destroyElement(Storage[2]) local index = math.random(1, #DPoint) deliveryspot[1] = createMarker(DPoint[index][1], DPoint[index][2], DPoint[index][3], "cylinder", 15, 20, 160, 0) deliveryspot[2] = createBlip(DPoint[index][1], DPoint[index][2], DPoint[index][3], 51, 10, 0, 0, 0, 255) outputChatBox("#1db8b5[Munka]#549c6bSikeressen felvetted a rendelést menj és szállítsd ki", 0, 0, 0, true) if (index == 1) then outputChatBox("#1db8b5[Munka]#549c6bHely:Reptér.", 0, 0, 0, true) end if (index == 2) then outputChatBox("#1db8b5[Munka]#549c6bHely:Dokkok.", 0, 0, 0, true) end if (index == 3) then outputChatBox("#1db8b5[Munka]#549c6bHely:Verdant Bluffs LS.", 0, 0, 0, true) end end, math.random(3000, 5000), 1) end end end if (source == deliveryspot[1]) then if (hitPlayer == localPlayer) then local vehicle = getPedOccupiedVehicle(hitPlayer) if (vehicle) then if (vehicle == getElementData(hitPlayer, "Jobveh")) then setElementFrozen(localPlayer,true) setElementFrozen(vehicle, true) setTimer(function() setElementFrozen(vehicle, false) setElementFrozen(localPlayer, false) destroyElement(deliveryspot[1]) destroyElement(deliveryspot[2]) WorkStart(); end, math.random(3000, 5000), 1) end end end end end end end )
  2. function giveV(player, car_id) if player and isElement(player) then if car_id and type(car_id) == 'number' then local _,i = hasV(player, car_id) local garagem = getElementData(player, 'conce.garage') or {} if i then outputChatBox('Você já tem este carro!') --infobox return false else table.insert(garagem, {id = car_id}) setElementData(player, 'conce.garagem', garagem) outputChatBox('Você adquiriu um '..vehicle[car_id].name..'.') --infobox return true end else outputDebugString('Aguardando arg #2 válido para a function hasV') return false end else outputDebugString('Aguardando arg #1 válido para a function hasV') return false end end I'm struggling to make a dealership script, but the giveV function doesn't add the car to the garage list even if the checks pass. Can anyone help?
×
×
  • Create New...