├── .gitattributes ├── fxmanifest.lua ├── config.lua ├── README.md ├── LICENSE └── client.lua /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /fxmanifest.lua: -------------------------------------------------------------------------------- 1 | fx_version 'cerulean' 2 | game 'gta5' 3 | 4 | description 'bbv-warp' 5 | version '1.0.0' 6 | 7 | client_scripts { 8 | 'client.lua', 9 | } 10 | 11 | shared_scripts { 12 | 'config.lua', 13 | } 14 | 15 | lua54 'yes' 16 | -------------------------------------------------------------------------------- /config.lua: -------------------------------------------------------------------------------- 1 | Config = {} 2 | 3 | Config.Warps = { 4 | [1] = { 5 | Enter = vector3(970.29, -1620.02, 30.11), 6 | Exit = vector3(818.47, -760.85, 26.2), 7 | HeadingExit = 0.36, -- heading for the exit 8 | }, 9 | [2] = { 10 | Enter = vector3(818.47, -760.85, 26.2), 11 | Exit = vector3(970.29, -1620.02, 30.11), 12 | HeadingExit = 0.47, -- heading for the exit 13 | }, 14 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # bbv-warp 2 | 3 | 4 | Buy Me a Coffee at ko-fi.com 5 | 6 | ![ezgif-5-ce90a05f63](https://github.com/BuddyNotFound/bbv-warp/assets/74051918/b127a907-571f-4f76-a135-8dcbc60536bb) 7 | 8 | 9 | > **Script information** 10 | 11 | Very simple teleport script with a fancy camera transition, if you are not in a vehicle it will just be a normal teleport. 12 | 13 | **Higher Quality Video :** 14 | 15 | https://streamable.com/udb9ot 16 | 17 | > Discord 18 | 19 | **BBV X WORLD | SCRIPTS - [Join](http://discord.bbv.world)** 20 | 21 | Most of my free work : https://bbv.world/category/free - tebex 22 | Most recent paid release : https://forum.cfx.re/t/paid-paint-shop-chameleon-paints-custom-colors/5151448 23 | 24 | As away if you enjoy my work and want to motivate me to create more stuff you can leave a :heart:. 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 BuddyBoyVillaa 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /client.lua: -------------------------------------------------------------------------------- 1 | Main = { 2 | ped = PlayerPedId 3 | } 4 | 5 | function Main:Warp(coords,heading) 6 | if IsPedInAnyVehicle(self.ped()) then 7 | self.veh = GetVehiclePedIsIn(PlayerPedId()) 8 | self.WarpPos = coords 9 | self.heading = heading 10 | self.Cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", 1) 11 | RenderScriptCams(true, 1, 1500, true, true) 12 | self:processCamera(self.Cam) 13 | else 14 | self.WarpPos = coords 15 | self.Cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", 1) 16 | self:processCamera(self.Cam) 17 | end 18 | end 19 | 20 | function Main:processCamera(cam) 21 | local vehpos = GetEntityCoords(self.veh) 22 | local vehfront = GetEntityForwardVector(self.veh) 23 | local vehfrontpos = vector3(vehpos.x - (vehfront.x * 3),vehpos.y - (vehfront.y * 3) ,vehpos.z - (vehfront.z * 2) ) 24 | 25 | local rotx, roty, rotz = table.unpack(GetEntityRotation(PlayerPedId())) 26 | local camX, camY, camZ = table.unpack(GetGameplayCamCoord()) 27 | local camRX, camRY, camRZ = GetGameplayCamRelativePitch(), 0.0, GetGameplayCamRelativeHeading() 28 | local camF = GetGameplayCamFov() 29 | local camRZ = (rotz+camRZ) 30 | 31 | SetCamCoord(cam, vehfrontpos.x, vehfrontpos.y, vehfrontpos.z + 0.2) 32 | PointCamAtCoord(cam, vehpos.x,vehpos.y,vehpos.z + 0.2) 33 | SetCamFov(cam, camF - 20) 34 | 35 | Wait(1500) 36 | SetPedCoordsKeepVehicle(PlayerPedId(), self.WarpPos) 37 | SetEntityHeading(PlayerPedId(), self.heading) 38 | local vehpos = GetEntityCoords(self.veh) 39 | local vehfront = GetEntityForwardVector(self.veh) 40 | local vehfrontpos = vector3(vehpos.x - (vehfront.x * 3),vehpos.y - (vehfront.y * 3) ,vehpos.z - (vehfront.z * 2) ) 41 | SetCamCoord(cam, vehfrontpos.x, vehfrontpos.y, vehfrontpos.z + 0.2) 42 | PointCamAtCoord(cam, vehpos.x,vehpos.y,vehpos.z + 0.2) 43 | 44 | Wait(1000) 45 | RenderScriptCams(false, 1, 1500, false, false) 46 | end 47 | 48 | local sleep = 1000 49 | 50 | CreateThread(function() 51 | while true do 52 | Wait(sleep) 53 | for k,v in pairs(Config.Warps) do 54 | local pos = GetEntityCoords(Main.ped()) 55 | local vpos = Config.Warps[k].Enter 56 | local dist = #(pos-vpos) 57 | if dist < 5 then 58 | sleep = 0 59 | DrawMarker(2, Config.Warps[k].Enter.x, Config.Warps[k].Enter.y, Config.Warps[k].Enter.z , 0.0, 0.0, 0.0, 0.0, 180.0, 0.0, 0.1, 0.1, 0.1, 255, 255, 255, 255, false, true, 2, nil, nil, false) 60 | Draw3DText(Config.Warps[k].Enter.x, Config.Warps[k].Enter.y, Config.Warps[k].Enter.z + 0.2, 0.2, '[E] - Warp') 61 | if IsControlJustReleased(1, 38) then 62 | Main:Warp(Config.Warps[k].Exit ,Config.Warps[k].HeadingExit) 63 | end 64 | end 65 | end 66 | end 67 | end) 68 | 69 | function Draw3DText(x, y, z, scl_factor, text) 70 | local onScreen, _x, _y = World3dToScreen2d(x, y, z) 71 | local p = GetGameplayCamCoords() 72 | local distance = GetDistanceBetweenCoords(p.x, p.y, p.z, x, y, z, 1) 73 | local scale = (1 / distance) * 2 74 | local fov = (1 / GetGameplayCamFov()) * 100 75 | local scale = scale * fov * scl_factor 76 | if onScreen then 77 | SetTextScale(0.0, scale) 78 | SetTextFont(0) 79 | SetTextProportional(1) 80 | SetTextColour(255, 255, 255, 215) 81 | SetTextDropshadow(0, 0, 0, 0, 255) 82 | SetTextEdge(2, 0, 0, 0, 150) 83 | SetTextDropShadow() 84 | SetTextOutline() 85 | SetTextEntry("STRING") 86 | SetTextCentre(1) 87 | AddTextComponentString(text) 88 | DrawText(_x, _y) 89 | end 90 | end --------------------------------------------------------------------------------