[Release] [Standalone] InteractTeleport

InteractTeleport

The script includes various functions and is all managed by just a few lines of code. The script ensures that you are in a certain area to be teleported to another by pressing the button set (default E (38))

Features:

  • Teleportation from area to area
  • Change the text that appears to you by entering the Teleport area
  • The TP of the whole vehicle with the person inside
  • Choose whether to teleport only the person or even the vehicle in which he or she is staying
  • Change the color of the marker (Panel)
  • Change the type of marker (Wiki)
  • Change the marker range
  • Change the button for teleportation (Wiki)
  • Change whether to create a blip on the map with your own characteristics or not (Wiki)

Installation:

  • Enter the script folder of your resource folder
  • Start the InteractTeleport resource in .cfg file

Download:

Imgur

Imgur

Imgur

Imgur

YouTube Video

Changelog:

  • Nothing at the moment
8 Likes

Some screenshots would be nice, thanks :+1:

i got this erros after i removed the ineract points you have made and i added my own then i got this problem

SCRIPT ERROR: @InteractTeleport/client.lua:106: attempt to index a number value (field ‘?’)
SCRIPT ERROR: @InteractTeleport/client.lua:47: attempt to index a number value (field ‘?’)

You forgot a fundamental part of the code. (SOLVED)

Added

Nice one :smiley:
Would be cool if done for a specific job?

Great release i have been looking for something like this for a long time ^^

It would be very nice if you can add jobs too!

Alright so I have a question I am looking for a circle teleport like that but will open a menu and give you options like I have a motel that has 12 floors how would you set up a teleport where you click on it and gives you options of floors and you click on the floor you want to go too?

you should set a particular thing or a custom message with plans and change the keys for teleportation

Thanks for screenshots !

Hey How to add teleports that can use olny specific jobs

Hey is it possible to just have a message poping saying like press E to enter? Instead of the circle? Thanks.

1 Like

hello , i do this, it’s works for me, can use only specific jobs
Here , job is blackmarket

ESX = nil
local PlayerData = {}

Citizen.CreateThread(function()
	while ESX == nil do
		TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
		Citizen.Wait(0)
	end
end)

RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
  PlayerData = xPlayer  
  Citizen.Wait(10000)
end)

RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
  PlayerData.job = job
end)

Citizen.CreateThread(function ()
    while true do
	if PlayerData.job ~= nil and PlayerData.job.name == "blackmarket" then
        Citizen.Wait(5)
        local player = GetPlayerPed(-1)
        local playerLoc = GetEntityCoords(player)

        for _,location in ipairs(positions) do
            teleport_text = location[4]
            pos1 = {
                x=location[1][1],
                y=location[1][2],
                z=location[1][3],
                heading=location[1][4]
            }
            pos2 = {
                x=location[2][1],
                y=location[2][2],
                z=location[2][3],
                heading=location[2][4]
            }
            ColorRed = location[3][1]
            ColorGreen = location[3][2]
            ColorBlue = location[3][3]

            vechicle = location[5]
            MarkerType = location[6]

            PressKey = location[9]

            range = {
                p1=location[10][1],
                p2=location[10][2],
                p3=location[10][3],
            }

            DrawMarker(MarkerType, pos1.x, pos1.y, pos1.z, 0, 0, 0, 0, 0, 0, range.p1, range.p2, range.p3, ColorRed, ColorGreen, ColorBlue, 200, 0, 0, 0, 1)

            if position_verf(playerLoc.x, playerLoc.y, playerLoc.z, pos1.x, pos1.y, pos1.z, 2) then 
                help_message(teleport_text)
                if IsControlJustReleased(1, PressKey) then
                    if vechicle == true then
                        if IsPedInAnyVehicle(player, true) then
                            FreezeEntityPosition(player, true)
                            DoScreenFadeOut(500)
                            Citizen.Wait(500)
                            DoScreenFadeIn(500)
                            FreezeEntityPosition(player, false)
                            SetEntityCoords(GetVehiclePedIsUsing(player), pos2.x, pos2.y, pos2.z)
                            SetEntityHeading(GetVehiclePedIsUsing(player), pos2.heading)
                        else
                            FreezeEntityPosition(player, true)
                            DoScreenFadeOut(500)
                            Citizen.Wait(500)
                            DoScreenFadeIn(500)
                            FreezeEntityPosition(player, false)
                            SetEntityCoords(player, pos2.x, pos2.y, pos2.z)
                            SetEntityHeading(player, pos2.heading)
                            notify_message(novehcile_message)
                        end
                    elseif vechicle == false then
                        if IsPedInAnyVehicle(player, true) then
                            notify_message(vehicle_message)
                        else
                            FreezeEntityPosition(player, true)
                            DoScreenFadeOut(500)
                            Citizen.Wait(500)
                            DoScreenFadeIn(500)
                            FreezeEntityPosition(player, false)
                            SetEntityCoords(player, pos2.x, pos2.y, pos2.z)
                            SetEntityHeading(player, pos2.heading)
                        end
                    end
                end
            end          
        end
	else
		Citizen.Wait(500)
	end
    end
end)

Yes, it sure works but it is not what many ask for as you limit the script to one role.
As soon as I have time I make a new release where I implement it

The message is there

Hello. Are there opportunities for teleportation to cost money? I would like you to deduct a certain amount from the player’s cash when teleporting there.
If not, how can this be changed to make this possible?