Skip to main content
A comprehensive prop placement system that allows players to place persistent, client-only props using inventory items. Features include preview placement with gizmos, owner-only removal, and efficient streaming based on player distance.
This script provides an immersive prop placement experience with persistent storage, client-side streaming for performance, and integration with popular placement gizmos.

Features

Persistent Props

Props are saved to MySQL and automatically restored on resource start, ensuring your placements persist across server restarts.

Client-Side Streaming

Non-networked entities spawn and despawn per-player within a configurable radius for optimal performance.

Owner-Only Removal

Toggleable system where only prop owners can remove their placements and receive the item back.

Placement Limits

Configurable limits per item and global maximum per player to prevent abuse and maintain server performance.

Advanced Placement UX

Uses gs_gizmo for intuitive placement or falls back to translucent ghost preview with rotation controls.

Framework Integration

Compatible with VORP Core and RSG Core frameworks with modular framework bridge support.

Installation

1

Download

Get the latest release from our Tebex Store and download it from your Keymaster
2

Extract

Extract the spooni_propPlacer folder to your server’s resources directory
3

Configure Dependencies

Ensure required dependencies are properly configured in your server.cfg
4

Start Order

Add ensure spooni_propPlacer to your server.cfg after dependencies

Dependencies

  • oxmysql: Database system for persistent storage
  • Framework: VORP Core (vorp_core, vorp_inventory) or RSG Core (rsg-core)
ensure oxmysql
ensure vorp_core          # or rsg-core
ensure vorp_inventory      # if using VORP
ensure gs_gizmo           # optional, for enhanced placement
ensure spooni_propPlacer
The SQL table is automatically created on first resource start.

Configuration

The script is highly configurable through the config/config.lua file. Here are the main configuration options:

Streaming Settings

-- Streaming configuration for performance optimization
Config.StreamRadius = 120.0        -- Load props within this distance
Config.DespawnRadius = 140.0       -- Unload beyond this distance
Config.StreamCheckIntervalMs = 1000 -- Streaming tick interval in milliseconds

Removal Settings

-- Prop removal configuration
Config.RemoveCommand = 'pickupprop'           -- Command to pick up props
Config.RemoveRadius = 2.5                     -- Distance required to remove props
Config.AllowOwnerOnlyRemoval = true           -- Only owners can remove their props

Limits Configuration

-- Placement limits to prevent abuse
Config.MaxItemsPerPlayer = 10  -- Global per-player placement cap

Placeable Items

Define which items can be placed as props:
-- Define placeable items and their corresponding props
Config.Placeables = {
    camp_chair = { 
        item = 'campchair', 
        prop = 'p_chair_10x', 
        maxPerPlayer = 3 
    },
    small_crate = { 
        item = 'smallcrate', 
        prop = 'p_crate03x', 
        maxPerPlayer = 5 
    },
    -- Add more placeable items as needed
}

Gizmo Configuration

Settings for the placement gizmo (used by gs_gizmo if available):
-- Gizmo placement settings
Config.Gizmo = {
    EnableCam = true,           -- Enable camera controls
    MaxDistance = 30,           -- Maximum placement distance
    MaxCamDistance = 40,        -- Maximum camera distance
    MinY = -40,                 -- Minimum Y position
    MaxY = 40,                  -- Maximum Y position
    MovementSpeed = 0.15        -- Movement sensitivity
}

Usage

Placing Props

1

Use Item

Use the configured inventory item from your inventory
2

Placement Mode

Inventory closes and placement gizmo opens (or translucent ghost appears)
3

Position Prop

Move and rotate the prop to desired position using controls
4

Confirm Placement

Confirm placement to save and spawn the prop client-side

Removing Props

1

Approach Prop

Stand near the prop you want to remove (within configured radius)
2

Use Command

Run /pickupprop (or your configured removal command)
3

Receive Item

Prop is removed and the original item is returned to your inventory

Placement Controls

When using gs_gizmo, follow the on-screen prompts for intuitive placement controls.
  • Move: Aim camera to move the ghost prop
  • Rotate: Use Q/E keys to rotate the prop
  • Confirm: Left Mouse Button to place
  • Cancel: Right Mouse Button to cancel placement

Database Structure

Props are persisted in the prop_placer table with the following structure:
CREATE TABLE prop_placer (
    id INT AUTO_INCREMENT PRIMARY KEY,
    owner_id VARCHAR(50) NOT NULL,
    placeable_key VARCHAR(50) NOT NULL,
    item_name VARCHAR(50) NOT NULL,
    model VARCHAR(100) NOT NULL,
    x FLOAT NOT NULL,
    y FLOAT NOT NULL,
    z FLOAT NOT NULL,
    rx FLOAT NOT NULL,
    ry FLOAT NOT NULL,
    rz FLOAT NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
The table is automatically created on first resource start. No manual database setup required.

Performance Optimization

The script is optimized for performance with several key features:
  • Client-Side Streaming: Props only load when players are nearby
  • Configurable Radii: Adjust streaming and despawn distances based on your server needs
  • Entity Limits: Prevent excessive prop placement with per-player and per-item limits
  • Safe Restarts: Automatic cleanup prevents duplicate entities after restarts

Performance Tips

  • Stream Radius: Keep Config.StreamRadius reasonable (100-150 units)
  • Check Interval: Increase Config.StreamCheckIntervalMs for less frequent checks
  • Item Limits: Set appropriate maxPerPlayer values for each placeable item
  • Global Limits: Use Config.MaxItemsPerPlayer to prevent excessive placement

Gizmo Integration

The script automatically integrates with gs_gizmo when available:
When gs_gizmo is running, the script provides a polished placement experience with advanced controls and visual feedback.

Gizmo Features

  • Intuitive Controls: Mouse and keyboard controls for precise placement
  • Visual Feedback: Real-time preview with proper lighting and shadows
  • Distance Limits: Configurable placement and camera distance limits
  • Smooth Movement: Adjustable movement speed for fine-tuning

Fallback Mode

When gs_gizmo is not available, the script falls back to a simpler placement system:
  • Translucent Ghost: Visual preview of the prop
  • Basic Controls: Simple movement and rotation controls
  • Functional Placement: All core features remain available
While the fallback mode works well, using gs_gizmo provides a significantly better user experience.

Troubleshooting

Ensure Config.Placeables[...].item exactly matches your inventory item name. Confirm your framework inventory system is running and supports getItemCount/subItem functions.
Double-check model names are valid and loadable on RedM. Verify the prop model exists in your server’s stream files.
Ensure the resource is not force-stopped mid-logic. The script automatically triggers client cleanup on stop/restart to prevent duplicates.
Reduce streaming radius, increase check intervals, lower placement limits, and ensure you’re not exceeding server entity limits.
Verify gs_gizmo is properly installed and started before spooni_propPlacer. Check that the resource is running without errors.

Framework Integration

The script includes built-in support for multiple frameworks:
-- Automatically detected when vorp_core is running
-- Requires vorp_inventory for item management
-- No additional configuration required

Credits

  • Placement Gizmo Integration: gs_gizmo by GlitchOo
  • Framework Bridge: Modular design for easy framework integration
  • Performance Optimization: Client-side streaming and efficient entity management

Support

If you encounter issues or need assistance:
I