1. 31-07-2020, 14:28
    #1

    Member
    274 • 469 • 3
    In-game: Nolep
    i done this but not works anybody can tell me ?

    marker = createMarker(-1632.8000488281 -2246.8999023438 31.5 "corona", 254, 0, 0, 255)

    function teleport(player)
    if getElementType(player)=="player" then
    local vehicle=getPedOccupiedVehicle(player)
    if source == marker then
    setElementPosition(vehicle, -1937.6999511719 -5122.2998046875 2475.8999023438)
    setElementFrozen(vehicle, true)
    setTimer(setElementFrozen, 1000, 1, vehicle, false)
    end
    end
    end
    addEventHandler("onClientMarkerHit", getRootElement(), teleport)

  2. 31-07-2020, 16:15 • #2
    @TKN can you help me bro ?

  3. 31-07-2020, 16:19 • #3
    It looks wrong

  4. 31-07-2020, 16:21 • #4
    Originally Posted by KingMercedes
    It looks wrong
    whats wrong ?

  5. 31-07-2020, 17:02 • #5
    Originally Posted by MegatroN!
    marker = createMarker(-1632.8000488281, -2246.8999023438, 31.5 "corona", 254, 0, 0, 255)

    function teleport(player)
    if getElementType(player)=="player" then
    local vehicle=getPedOccupiedVehicle(player)
    if source == marker then
    setElementPosition(vehicle, -1937.6999511719,
    -5122.2998046875, 2475.8999023438)
    setElementFrozen(vehicle, true)
    setTimer(setElementFrozen, 1000, 1, vehicle, false)
    end
    end
    end
    addEventHandler("onClientMarkerHit", getRootElement(), teleport)
    ty my bro
    1 Like

  6. 31-07-2020, 17:13 • #6

  7. 31-07-2020, 18:17 • #7
    You dont need to create threads for such things, just contact me via Skype or Discord. Here you go;

    Code:
    Me = getLocalPlayer()
    marker1 = createMarker(-1632.8000488281, -2246.8999023438, 31.5, "corona", 254, 0, 0, 255) 
    
    function teleport(player, matchingDimension)
      if player ~= Me then return end
      local vehicle = getPedOccupiedVehicle(player)
        if source == marker1 then
        setElementPosition(vehicle, -1937.6999511719, -5122.2998046875, 2475.8999023438)
        setElementFrozen(vehicle, true)
        setTimer(setElementFrozen, 1000, 1, vehicle, false)
        end
    end
    addEventHandler("onClientMarkerHit", getRootElement(), teleport)
    Last edited by TKN; 31-07-2020 at 18:21.

  8. 31-07-2020, 18:25 • #8

    Head of PTP

    325 • 1,707 • 5
    In-game: ffsJessePinkman
    Edit: Oh, TKN already replied...

    onClientMarkerHit is only triggered by players, not vehicles.

    Here's a workaround:

    Code:
    marker = createMarker (-1632.8000488281, -2246.8999023438, 31.5, "corona", 1, 255, 0, 0, 255)
    
    function teleport (player)
        if getPedOccupiedVehicle(player) then
            local vehicle = getPedOccupiedVehicle(player)
            setElementPosition(vehicle, -1937.7, -5122.3, 2475.9)
            setElementFrozen(vehicle, true)
            setTimer(setElementFrozen, 800, 1, vehicle, false)
        else
            setElementPosition(player, -1937.7, -5122.3, 2475.9)
            setElementFrozen(player, true)
            setTimer(setElementFrozen, 800, 1, player, false)
        end
    end
    addEventHandler("onClientMarkerHit", marker, teleport)
    Last edited by JessePinkman; 31-07-2020 at 18:28.

  9. 01-08-2020, 18:27 • #9
    Originally Posted by TKN
    You dont need to create threads for such things, just contact me via Skype or Discord. Here you go;

    Code:
    Me = getLocalPlayer()
    marker1 = createMarker(-1632.8000488281, -2246.8999023438, 31.5, "corona", 254, 0, 0, 255) 
    
    function teleport(player, matchingDimension)
      if player ~= Me then return end
      local vehicle = getPedOccupiedVehicle(player)
        if source == marker1 then
        setElementPosition(vehicle, -1937.6999511719, -5122.2998046875, 2475.8999023438)
        setElementFrozen(vehicle, true)
        setTimer(setElementFrozen, 1000, 1, vehicle, false)
        end
    end
    addEventHandler("onClientMarkerHit", getRootElement(), teleport)
    ty bro

1 Users reading this thread (0 Members and 1 Guests)