Hello FiveM Community.
A script can convert peds mugshot image to Base64 encoding to save that as save and manage that
Features
Can cache image as text anywhere (JSON, SQL, TXT)
No need to upload anywhere
So fast don’t need to wait much to get that
Standalone it doesn’t use any function from anywhere
Can make a mugshot from any ped, not just self player
Optimize and get low usage (0.00 on idle and 0.01 on converting)
Clean coding
Resource preview
Video
Requirements
Github
Download & Installation
Installation
Add this in your server.cfg
in the following order:
start MugShotBase64
Exports
Client
Export
Description
Parameter(s)
Return type
GetMugShotBase64
Returns base64 string
Ped Hanel, bool(Transpert)
string
Credits
23 Likes
I recall seeing if something like this was around a long while ago…
Great work.
Will be useful for a great many of us.
1 Like
Beautiful code, great work!
1 Like
How do I use export from another resource?
1 Like
If I store this Base64 string for every player in Database, then retrieve it for ex. phone or mdt, how can I convert this String back to picture?
1 Like
It’s not hard to litterally use google.
Its the src= within html.
1 Like
local MugShot = exports["MugShotBase64"]:GetMugShotBase64(GetPlayerPed(-1), false)
I wanted to tell from the server how to get it, I already figured it out
local photo = exports["MugShotBase64"]:GetMugShotBase64(PlayerPedId(), true)
--print(photo)
TriggerServerEvent('fivem-appearance:save', appearance, photo)
I try to save a photo when a player creates or changes his character.
1 Like
BaziForYou:
Requirements
This should be a requirement for all script releases!
2 Likes
Amazing job! Thanks for the release
1 Like
negbook
August 30, 2021, 12:43pm
14
Questions:How you find that https://nui-img/ feature…? I found not any informations about that in google.
1 Like
hi I found in GitHub in one script cant remember the name but just need to search in GitHub like:
// -- Copyright (c) Renzuzu
// -- All rights reserved.
// -- Even if 'All rights reserved' is very clear :
// -- You shall not use any piece of this software in a commercial product / service
// -- You shall not resell this software
// -- You shall not provide any facility to install this particular software in a commercial product / service
// -- If you redistribute this software, you must link to ORIGINAL repository at https://github.com/renzuzu/renzu_hud
// -- This copyright should appear in every part of the project code
var carui = 'minimal'
var statusui = 'normal'
var status_type = 'progressbar'
var class_icon = 'circle'
var statleft = false
var isambulance = false
var loopfuck = false
var rpmanimation = false
var speedanimation = false
let setting = {}
let usersetting = {}
var featstate = {}
This file has been truncated. show original
this is amazing , keep up the good work :3
1 Like
Hello friend.
Many Thanks for this awsome job.
How can i request shot from another player ? From client side of course.
Thank you so much
if you want all in client you can do like this
local PlayerId = 2
local Answer = {Got = false,Answer = ""}
for _, i in ipairs(GetActivePlayers()) do
if NetworkIsPlayerActive(i) and tonumber(GetPlayerServerId(i)) == tonumber(PlayerId) then
local Ped = GetPlayerPed(i)
Answer.Answer = exports["MugShotBase64"]:GetMugShotBase64(Ped, false)
Answer.Got = true
break
end
end
1 Like
Gelvin
February 25, 2022, 9:26pm
19
Is there a way to do it with server side?
Gelvin
February 25, 2022, 9:27pm
20
i want to do it like that if possible.
QBCore.Functions.CreateCallback('qb-phone:server:GetPlayerInfo', function(source, cb)
local Playerinfo = {}
local Player = QBCore.Functions.GetPlayer(source)
Playerinfo = {
name = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname,
phone = Player.PlayerData.charinfo.phone,
typejob = Player.PlayerData.job.name,
mugshot= {mugshothere}
}
cb(Playerinfo)
end)