📢LIFE INVADER

Note: This documentation covers all configuration options available to server owners. The script automatically detects your framework (ESX, QBCore, QBox) and handles phone number integration from vari


1) Overview

Risk Life Invader is a dynamic announcement system for FiveM servers featuring:

  • 📢 Public or anonymous announcements

  • 💰 Pay-per-character pricing system

  • ⏱️ Configurable cooldown system

  • 🚫 Word blacklist/filter

  • 👮 Job-based announcements (Police, EMS, etc.)

  • 📱 Automatic phone number detection

  • 🔔 Discord webhook integration (public + admin logs)

  • 🎨 Fully customizable UI with job-specific themes


2) Basic Configuration

Framework Detection

-- Framework is automatically detected (ESX, QBCore, QBox)
-- No manual configuration needed

Location Setup

Default location: Life Invader Office in Downtown Los Santos To get coordinates: Stand where you want the location and use /getcoords

Interaction Range


3) Pricing System

Basic Pricing

How it works:

  • Total characters = Message + Title (if countTitleInPrice = true)

  • Cost = Total characters × perChar

  • If cost < min, charge min

  • If max > 0 and cost > max, charge max

Example calculations:

Example 1: Basic pricing

Example 2: With minimum

Example 3: With maximum

Example 4: Title excluded from price

Pricing Strategies

Free announcements:

Flat rate ($100 per announcement):

Expensive (discourage spam):

Cheap (encourage use):


4) Cooldown System

How it works:

  • After sending an announcement, player must wait CooldownTime before sending another

  • Cooldown is per-player (not global)

  • Set to 0 to disable cooldown

Time conversion:


5) Blacklist / Word Filter

How it works:

  • Checks both title and message for blacklisted words

  • Case-insensitive (matches "HITLER", "hitler", "HiTlEr")

  • If found, announcement is blocked and player is notified

  • No charge if blocked

To disable blacklist:

Adding custom words:

Best practices:

  • Use lowercase only (script converts to lowercase)

  • Add common variations

  • Test your blacklist before going live

  • Balance moderation with freedom of expression


6) Phone Number System

How it works:

  • Public announcements: Shows sender's real phone number (if available)

  • Anonymous announcements: Shows "Anonymous" (no phone number)

  • Fallback: If no phone found, shows DummyPhone

Phone detection order:

  1. lb-phone export

  2. roadphone export

  3. qb-phone export

  4. Framework's phone field (QBCore/ESX)

  5. Database query (users.phone_number / players.phone)

  6. Fallback to DummyPhone

Configuration options:

Show real phone numbers:

Always use dummy phone (privacy):

Custom fallback numbers:


7) Job Announcements System

How it works:

  • Authorized jobs can send announcements via command

  • Format: /job Message text here

  • Format with title: /job Title | Message text here

  • No cost for job announcements

  • Custom styling per job type

Command usage:

Configuration options:

Enable/disable system:

Change command:

Adding more jobs:

Title fallback:

Style system: The style parameter applies custom CSS styling:

  • "police" — Blue theme

  • "ambulance" — Red theme

  • "taxi" — Yellow theme


8) Visual Configuration

Map Blip

Blip customization:

  • sprite: Icon type — Blip Spritesarrow-up-right

  • color: Color ID (0-85)

  • scale: Size multiplier (0.5 = small, 1.5 = large)

  • name: Text on map

Popular sprites:

3D Marker

Marker types:

  • 21 — Arrow pointing down (recommended)

  • 1 — Cylinder

  • 27 — Circle outline

  • 29 — Flat circle

Full Marker Listarrow-up-right

Color examples:


9) Notification System

To use default notifications:

To integrate other systems:

ox_lib:

mythic_notify:

t-notify:


10) Text Localization

Customizing messages:

German:

Spanish:

French:


11) UI Text Configuration

Main UI Headers

Information Box

Message Input Section

Customization examples:

Roleplay server:

Community server:


12) Discord Webhooks

Public Webhook (Player Announcements)

What it logs:

  • Announcement title and message

  • Sender name (if public) or "Anonymous"

  • Phone number (if public)

  • Custom thumbnail and branding

Admin Webhook (Detailed Logs)

What it logs:

  • Full announcement details

  • Sender's in-game name

  • Server ID

  • Discord mention (if linked)

  • Phone number

  • Cost and payment method

  • Public or anonymous status

Job Colors

Adding custom colors:

Webhook Setup

To get Discord webhook URL:

  1. Open Discord server settings

  2. Go to "Integrations" → "Webhooks"

  3. Click "New Webhook"

  4. Name it (e.g., "LifeInvader Public" or "LifeInvader Admin")

  5. Select channel

  6. Copy webhook URL

  7. Paste into config

Best practices:

  • Use separate webhooks for public and admin logs

  • Put admin logs in staff-only channel

  • Put public logs in community channel (optional)

  • Test webhooks before going live

Color conversion: Use hex colors with 0x prefix:

Or use decimal:


13) UI Theming / Colors

Customize in html/config.css:

Job-Specific Themes

Theme Examples

Red/Black Theme (Aggressive):

Blue Theme (Professional):

Green Theme (Money/Business):

Purple Theme (Elite/VIP):


14) Complete Configuration Examples

Example 1: Free Community Board

Example 2: Serious RP Server

Example 3: Economy Server (Paid Ads)

Example 4: Casual Server (Easy & Fun)


15) Troubleshooting

❌ "You don't have enough money"

Cause: Player doesn't have sufficient cash/bank balance Solution:

  • Lower RISK.Price.perChar

  • Lower or remove RISK.Price.min

  • Test with /givemoney [id] 10000

❌ "You still have a cooldown of X"

Cause: Player sent announcement recently Solution:

  • Lower RISK.CooldownTime

  • Set to 0 to disable

  • Restart resource to clear cooldowns

❌ "Forbidden word: X! Ad not sent."

Cause: Message contains blacklisted word Solution:

  • Remove word from RISK.BlacklistedWords

  • Use different wording

  • Disable blacklist: RISK.BlacklistedWords = {}

❌ Phone number shows as "555-0102"

Possible causes:

  • Phone resource not installed/started

  • Player doesn't have phone number assigned

  • Phone resource not compatible

Solution:

  • Install compatible phone resource (lb-phone, qb-phone, roadphone)

  • Assign phone numbers to players

  • Change RISK.DummyPhone to preferred fallback

❌ UI won't open

Possible causes:

  • Too far from location

  • Marker/blip disabled

  • Conflicting resource

Solution:

  • Stand directly on RISK.Point location

  • Enable marker: RISK.Marker.enabled = true

  • Check console for errors (F8)

  • Restart resource: /restart risk-lifeinvader

❌ Job command not working

Possible causes:

  • RISK.JobNotify.enabled = false

  • Player's job not in allowed list

  • Wrong command name

Solution:

  • Set RISK.JobNotify.enabled = true

  • Add job to RISK.JobNotify.allowed

  • Check command: RISK.JobNotify.command

  • Verify player has correct job

❌ Notifications not showing to other players

Possible causes:

  • Script not started properly

  • Client-side error

  • Custom notification issue

Solution:

  • Restart resource

  • Check all player consoles (F8)

  • Test with Config.UseCustomNotify = false

❌ Discord webhooks not sending

Possible causes:

  • Invalid webhook URL

  • Webhook deleted from Discord

  • Enabled = false

Solution:

  • Create new webhook

  • Copy full URL including /12345/token

  • Set WebhookConfig.Public.Enabled = true

  • Set WebhookConfig.AdminLog.Enabled = true

❌ Announcements show wrong phone number

Cause: Phone detection not working Solution:

  • Verify phone resource is started

  • Check phone resource exports

  • Set custom RISK.DummyPhone

  • Or disable: RISK.UsePhoneNumberInPublicAnnounce = false


16) Best Practices

Balance pricing with server economy — Don't make too expensive or too cheap ✅ Use cooldowns to prevent spam — 5-15 minutes recommended ✅ Maintain blacklist regularly — Add problematic words as they appear ✅ Test job announcements — Ensure all jobs can use the system ✅ Use webhooks for moderation — Monitor admin logs channel ✅ Keep UI text clear — Explain pricing and rules in info box ✅ Test phone integration — Verify phone numbers display correctly ✅ Customize themes — Match your server's branding ✅ Monitor usage patterns — Adjust pricing based on activity ✅ Communicate changes — Tell players about pricing/cooldown updates


17) Quick Start Checklist

  • [ ] Set location: RISK.Point

  • [ ] Configure pricing: RISK.Price

  • [ ] Set cooldown: RISK.CooldownTime

  • [ ] Add blacklisted words: RISK.BlacklistedWords

  • [ ] Enable/configure job announcements: RISK.JobNotify

  • [ ] Set phone number options: RISK.UsePhoneNumberInPublicAnnounce

  • [ ] Configure Discord webhooks (optional)

  • [ ] Customize UI text: RISK.UI, RISK.Info, RISK.Message

  • [ ] Customize colors in config.css (optional)

  • [ ] Test with multiple players

  • [ ] Restart resource: /restart risk-lifeinvader


18) How It Works

Announcement Flow

  1. Player approaches location → Sees marker/blip

  2. Presses E → Opens UI with tablet animation

  3. Writes message → Price updates live based on character count

  4. Chooses public/anonymous → Preview updates

  5. Selects payment method → Cash or bank

  6. Clicks "Send Announcement" → Server validates and charges

  7. Checks blacklist & cooldown → Blocks if violation

  8. Broadcasts to all players → In-game notification appears

  9. Logs to Discord → Admin and public webhooks (if enabled)

  10. Player enters cooldown → Must wait before next announcement

Job Announcement Flow

  1. Authorized player types command/job Message here

  2. Server validates job → Checks if job is in allowed list

  3. No cost charged → Job announcements are free

  4. Broadcasts with custom style → Uses job-specific theme colors

  5. Logs to Discord → Includes job information

Security Features

  • ✅ Server-side money validation

  • ✅ Server-side blacklist checking

  • ✅ Server-side cooldown tracking

  • ✅ Price calculated server-side (not in UI)

  • ✅ Job permissions verified server-side

  • ✅ Discord logging for admin oversight


Last updated