Description
The Steam Profile Info Grabber script is a powerful utility for FiveM servers that fetches and stores Steam profile information for players. It allows server owners to display player avatars, account age check, and profile URLs while ensuring optimized performance with caching and rate limit handling. This script helps enhance server security, improve user experience, and enforce steam account age restrictions if necessary.
Features
✅ Fetches Steam profile images, account age, and profile URL
✅ Show All Online Players With Steam Account Less Than X Days
✅ Prevent Access To Server If Steam Account Is Not Older Than X Days
✅ Stores data in MySQL for fast retrieval
✅ Caches data to minimize API requests
✅ Automatically updates profiles every X days
✅ Customizable Steam account age restrictions for joining
✅ Exports available for use in other scripts
✅ Built-in API rate limit handling
Requirements
FiveM Server
MySQL-Async / OxMysql
Steam API Key (Get one from Steam Developer API)
Its A Standalone Resource Means Can Run In Any Framework
Installation Guide
1️⃣ Download & Install
Place the script folder in your
resources
directory.Ensure
mysql-async / OxMysql
is installed and running.Add the script to your
server.cfg
:
ensure doitdigital_SteamProfile
2️⃣Configuration
Config.SteamAPIKey = GetConvar('steam_webApiKey', '') -- Steam API Key
Config.RefreshInterval = 1 -- Refresh profile data every X days
Config.ApiRequestInterval = 1 -- Prevents API rate limit issues
Config.DefaultProfileImage = "https://someimage.com/default.png" -- Default profile picture
Config.MinimumSteamAgeToJoin = 0 -- Minimum Steam account age in days (0 = No restriction)
Server Exports (For Use in Other Scripts)
You can retrieve Steam profile information using the following exports:
local profile = exports['steam_profile_info']:GetPlayerSteamProfile(steamID) -- ALL PROFILE DATA IN TABLE FORMAT
local image = exports['steam_profile_info']:GetPlayerSteamImage(steamID)
local profileURL = exports['steam_profile_info']:GetPlayerProfileURL(steamID)
local accountAge = exports['steam_profile_info']:GetPlayerAccountAge(steamID)
Commands
🔹 /updatesteamprofile [playerID]
Manually force an update for a player's Steam profile.
🔹 /getprofileage [playerID]
Displays the account age of the specified player in days.
🔹 /getNewSteams [days]
Display all online players with steam account smaller theX days ( usefull to find cheaters / abusers )
If a player’s profile is private or unavailable, a default profile image is used.
*It uses the official CFX escrow encryption that ensures buyer's and seller's protection but the more important funtions are free to edit!