CS GSR

Cheep Scripts Development
December 7, 2025
CS GSR

Description

GSR Detection System

A standalone Gunshot Residue (GSR) detection system for FiveM that tracks firearm discharge and provides realistic forensic testing capabilities.

Features

  • Automatic GSR Detection: Detects when players fire firearms and applies GSR state
  • Body Part Tracking: Separately tracks GSR on hands and clothing
  • Intensity Levels: GSR intensity ranges from Trace to Strong based on weapon type and shot count
  • Weapon-Specific Multipliers: Different weapons produce different amounts of GSR
  • Suppressor Detection: Suppressed weapons produce less GSR
  • Gloves Protection: Wearing gloves protects hands from GSR
  • Hand Washing: Players can wash hands to remove GSR (requires water source)
  • Clothing Changes: Automatically clears clothing GSR when player changes clothes
  • Proximity Testing: GSR tests require proximity to the target player
  • Time-Based Degradation: GSR intensity decreases over time
  • ox_inventory Support: Optional test kit item requirement

Installation

  1. Place the cs_gsr folder in your resources/[scripts] directory
  2. Add ensure cs_gsr to your server.cfg
  3. Configure settings in config.lua
  4. Restart your server

Configuration

All configuration options are in config.lua:

Base Settings

  • GSRDuration: Base duration in seconds (default: 15 minutes)
  • MaxGSRDuration: Maximum GSR duration cap (default: 30 minutes)
  • ResetTimerOnNewShot: Legacy option for timer reset behavior

Hand Washing

  • EnableHandWashing: Enable/disable hand washing feature
  • HandWashDuration: Duration in seconds to wash hands
  • WashDistance: Distance to water source in meters
  • RequireWaterSource: Require proximity to water source

Proximity Testing

  • EnableProximityCheck: Enable proximity requirement for testing
  • ProximityDistance: Required distance in meters to test GSR
  • TestDuration: Duration in seconds for GSR test

GSR Intensity

  • BaseIntensityPerShot: Base intensity added per shot (0-100 scale)
  • MaxIntensity: Maximum intensity cap
  • IntensityThresholds: Thresholds for Strong, Moderate, Weak, and Trace levels

Time Degradation

  • EnableTimeDegradation: Enable time-based GSR degradation
  • DegradationRate: Intensity points lost per minute
  • DegradationInterval: Check interval in seconds

Weapon Multipliers

  • WeaponMultipliers: Custom multipliers for specific weapons
  • SuppressedWeaponMultiplier: Multiplier for suppressed weapons (default: 0.7)
  • DefaultWeaponMultiplier: Default multiplier for unlisted weapons

Body Part Tracking

  • EnableBodyPartTracking: Enable separate tracking for hands and clothing
  • GlovesProtection: Enable gloves to protect hands from GSR

ox_inventory Integration

  • EnableTestKitRequirement: Require test kit item to perform GSR tests
  • TestKitItemName: Name of the test kit item in ox_inventory

Commands

/checkgsr <id>

Check a player's GSR status. Requires proximity to the target player.

Usage:

/checkgsr 1

/washhands

Wash your hands to remove GSR. Requires proximity to a water source if enabled.

/changeclothes

Manually trigger clothing change (clears clothing GSR). Note: Clothing changes are also detected automatically.

Exports

Server-Side

exports['cs_gsr']:HasGSR(playerId)

Returns true if the player has GSR, false otherwise.

Example:

local hasGSR = exports['cs_gsr']:HasGSR(source)
if hasGSR then
    print("Player has GSR")
end

How It Works

  1. Detection: When a player fires a weapon, the client detects the shot and validates it's a firearm (not melee or taser)
  2. GSR Application: The server calculates GSR intensity based on weapon type, suppressor status, and glove protection
  3. Body Part Tracking: GSR is applied to hands and/or clothing based on whether gloves are worn
  4. Accumulation: Multiple shots accumulate GSR intensity up to the maximum cap
  5. Degradation: GSR intensity decreases over time at a configurable rate
  6. Testing: Players can test GSR on others using /checkgsr, which requires proximity and shows detailed results
  7. Removal: GSR can be removed by washing hands or changing clothes

GSR Intensity Levels

  • Strong (80-100): High intensity, typically from multiple shots or high-caliber weapons
  • Moderate (50-79): Medium intensity
  • Weak (20-49): Low intensity
  • Trace (1-19): Minimal GSR presence

Notes

  • GSR automatically expires after the configured duration
  • Suppressed weapons produce 30% less GSR by default
  • Wearing gloves protects hands but GSR still applies to clothing
  • Clothing changes are automatically detected and clear clothing GSR
  • The script is framework-independent and works standalone

For support join my discord

https://discord.gg/5UP6j76CVe

Reviews

Please sign in to leave a review
No reviews yet. Be the first to review!
Free
0.0(0 reviews)
0 downloads
Category: Utility