Teleport Menu


🧾 Overview

Name: Advanced Teleportation Script Version: 1.1 Author: 0Gravity BVVS Framework: Standalone Compatible with: ESX / QBCore (customizable) Description: A lightweight but powerful teleportation script that offers an in-game selection menu, admin-only points, cooldown logic, and automatic Discord logging of each teleport action.


πŸš€ Installation

  1. Place the script folder inside your server's resources directory.

  2. In server.lua, configure your Discord webhook:

  3. Add the resource to your server.cfg:


βš™οΈ Features

  • /teleport command to open a menu or teleport to a location

  • Native notification system

  • Admin-only teleport points

  • Discord webhook integration

  • (Optional) Cooldown system structure


🧭 Teleport Locations

Teleportation points are defined in client.lua as:

You can add or remove locations as needed. Use adminOnly = true to restrict access to admins.


πŸ” Admin Permissions

Inside client.lua, the isPlayerAdmin() function determines who can access admin-only locations.

You can modify this to work with your framework:

  • ESX:

  • QBCore:


πŸ–₯️ Usage

Command:

Behavior:

  • If no argument is provided: a list of available points is displayed.

  • If a number is provided: the player is teleported to the selected destination. Example:

Feedback: Players receive a native notification on-screen with teleport status.


πŸ“Š Discord Logging

Every teleport action triggers a server event:

The server then sends a message to your Discord via webhook:

This is handled in server.lua using PerformHttpRequest.


⏲️ Cooldown Logic

A cooldown system is prepared using:

Currently, cooldown is not enforced. You can extend this logic to prevent frequent teleports.


🧱 File Structure


πŸ’‘ Suggestions for Improvement

  • Implement real cooldown enforcement

  • Migrate teleport points to config.lua

  • Add GUI/NUI teleportation interface

  • Add sound or animation effects

  • Support ox_lib or qb-menu UI integration

  • Add a whitelist system using Discord IDs


πŸ§ͺ Example Workflow

  1. Player types /teleport

  2. Script shows a list of available teleport points

  3. Player types /teleport 1

  4. Player is moved to "LS Airport"

  5. Log appears on Discord with player name and location


Would you like me to export this as a ready-to-import GitBook .md structure or help set up a config file?

Last updated