[FREE] [STANDOLE] [UPDATED] M-PropCreatorV2

Prop Creator - Standalone FiveM Script

Description :scroll:

Prop Creator is a fully standalone script that allows the creation and management of props within the game world. With this script, administrators can dynamically generate, place, and remove objects through an intuitive interface with seamless database integration.

GITHUB = GitHub - M-DEVELOPMENT23/M-PropV2: Fully standalone script that allows the creation and management of props within the game world. With this script, administrators can dynamically generate, place, and remove objects through an intuitive interface with seamless database integration.
YouTube = https://www.youtube.com/watch?v=LAkm6Yz-vxE

Features :hammer_and_wrench:

:white_check_mark: Real-time prop creation with customizable position, rotation, and collision settings.
:white_check_mark: Database-backed prop management for full persistence.
:white_check_mark: Prop removal menu, with options to delete a specific prop or all at once.
:white_check_mark: Smooth spawning and despawning effects to optimize performance and improve immersion.
:white_check_mark: Support for multiple notification systems, including ox_lib.
:white_check_mark: Configurable permission system to restrict command access.
:white_check_mark: Highly optimized for efficient server performance.


Installation :inbox_tray:

:one: Download and add the script

Place the script folder in your server’s resources/ directory and rename it to M-PropV2

:two: Configure server.cfg

Add the following line to your server.cfg:

ensure M-PropV2

:three: Set up the database

Run the following SQL query in your database to store props:

CREATE TABLE IF NOT EXISTS `mprops` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `propid` VARCHAR(50) NOT NULL,
    `propname` VARCHAR(100) NOT NULL,
    `x` FLOAT NOT NULL,
    `y` FLOAT NOT NULL,
    `z` FLOAT NOT NULL,
    `heading` FLOAT NOT NULL,
    `freeze` BOOLEAN NOT NULL,
    `colision` BOOLEAN NOT NULL
);

Usage :pushpin:

:building_construction: Creating a Prop

  • Use the /propcreator command to open the admin menu.
  • Select the “Create a Prop” option and enter the required details.
  • Place the prop in the world using movement controls.

:wastebasket: Deleting Props

  • Access the deletion menu via /propcreator.
  • Choose to remove a specific prop or delete all props from the server.

:control_knobs: Configuring Permissions

Modify permissions in config.lua:

Configuration = {
    Command = "propcreator",
    CommandAccess = "group.admin",
}

Available Events :satellite:

:small_blue_diamond: Client → Server

Event Description
m:propcreator:RequestProps Requests the list of stored props from the database.
m:propcreator:RemoveProp Deletes a specific prop by ID.
m:propcreator:RemoveAllProps Deletes all stored props.

:small_blue_diamond: Server → Client

Event Description
m:propcreator:SpawnProps Spawns props stored in the database.
m:propcreator:DeleteAllProps Removes all props from the game world.
m:propcreator:createremovemenu Displays the prop deletion menu.

Controls :video_game:

These are the controls for moving and adjusting props in the game world:

[Q]    - Move Up
[E]    - Move Down
[ARROWS] - Move
[Scroll Wheel] - Rotate
[LALT] - Adjust Height
[ESC]  - Finish Editing

Optimization :rocket:

This script is designed to be lightweight and efficient, using:

  • Dynamic loading and unloading of props based on distance to reduce server load.
  • Well-structured event handling to avoid unnecessary executions.
  • Integration with ox_lib for managing interfaces and notifications.

Credits :man_technologist:

Developer: M-DEVELOPMENT
For support or suggestions, feel free to reach out! :tada:


License :scroll:

This script is open-source. You may modify and adapt it to your needs, but reselling it is not allowed.

Code is accessible Yes/No
Subscription-based Yes/No
Requirements ox_lib & oxmysql
Support Yes/No
9 Likes

First of all, thank you very much for this contribution.
We allready know M-development for their quality scripts.

Was thinking about this, cause i need to change some hospital beds, this comes at the right time
for me! Delete props and add others ones, love it!

Thanks,
Randy

edit love it, was hoping to delete excisting props ingame with this script also, guess codewalker needed. nonetheless works perfectly!

2 Likes

1 Like

For any suggestion or any new script do not hesitate to tell me, I will look into being able to remove props that were already created :heart:

1 Like

suggestion, change speed of movement of props with f.e. CTRL for slower adjustment

3 Likes

How do I place the object? When I hit esc it disappears

1 Like

If you’ve installed everything correctly but the issue persists, try using:
setr game_enableDynamicDoorCreation “true”
Are you using QBCore or ESX?

I’ll upload the update in the coming days.

2 Likes

I’m using esx. I’m kinda a newbie to all this.

1 Like

Today I upload the fix for esx users

uploaded !! download the last version on github

The collision is not working> I am running QBCore

Open a ticket on me discord it should be working