This small FiveM server script reads each player’s Steam profile through the Steam Web API: their avatar, how old the account is, and the profile link. It stores everything in MySQL and only asks Steam again every few days, so you stay clear of the API’s rate limits.
What you can do with it
- Keep brand-new accounts out: set a minimum Steam account age, in days, to join
- Find alts and ban evaders: /getNewSteams [days] lists every online player whose Steam account is younger than that
- Check one player: /getprofileage [id] shows their account age, and /updatesteamprofile [id] refreshes their profile
- Show avatars in your own scripts through the exports below
Exports
exports['steam_profile_info']:GetPlayerSteamProfile(steamID): everything, as a tableGetPlayerSteamImage(steamID),GetPlayerProfileURL(steamID)andGetPlayerAccountAge(steamID)
Config
| Option | Default |
|---|---|
| Steam API key | Read from the steam_webApiKey convar in server.cfg |
| Refresh interval | Every 1 day |
| Time between API requests | 1 |
| Default image | Used for private or missing profiles |
| Minimum account age to join | 0 (off) |
Needs mysql-async or oxmysql and a free key from the Steam developer page. Standalone, so it works with any framework. Protected by Cfx asset escrow, with the main functions left open to edit.