[HELP] Display mugshot permanently on screen?

Hi all, just wondering if there’s a way to display the mugshot on screen permanently. Maybe by attaching it to a DIV element or something? I’m looking at making a UI that would be pretty cool with the player’s mugshot always shown.

I’ve seen loads of posts attaching it to notification functions and what not using the natives listed below but nothing speaking about it simply being printed on screen permanently for UI purposes.

REGISTER_PEDHEADSHOT
GET_PEDHEADSHOT_TXD_STRING
UNREGISTER_PEDHEADSHOT
IS_PEDHEADSHOT_READY
IS_PEDHEADSHOT_VALID

I’ve been tinkering with making it save to the database as a blob, allowing nui to call it later.

Still a ways away as I’m focusing on other things. But the concept is still there.

Oh mate, this would be perfect. Would this fix the issue of only being able to register 34 mugshots at one time as well?

It grabs the mugshot and saves the sprite or w.e way it prints as a string right? Is that data not easily available to grab?

Yep, after the mugshot is generated, it would be sent to the Database and then removed from the local code.

So unless like, 50 people change their appearance at the exact same time and overload the shit out of register_pedheadshot, it should work just fine.

Probably few weeks away. Work is killing me.

This is pretty much everything I’ve been looking for, especially since I’ve been teetering on whether to use it or not because of the 34 player cap. Is it going to update on every login? Was just thinking, what if people change their skin/ped in server.

Are you going to be making it into an easily usable resource? Or just developer code?

If you need any help finishing it, I might be able to put my limited knowledge to use :stuck_out_tongue:

I’m hopefully going to port it as a resource.

Aiming to launch it with with the phone I’m making because I wanted the contacts to have the portraits of the phone numbers owner.

It should be able to be called as an event to update when ever you want.
Like on ped change or on clothes change.

Or at least, thats the end goal.

There are ways of already using it and screenshoting the drawn sprite and exporting it to a website to host the image.

I just want to keep it locally incase the third party website goes down.

But yeah, great minds think alike.

Was literally just going over your phone idea and that’s another thing I’ve been thinking about for a while. I’m so reluctant to go into GCPhone and change anything because it just seems so complicated, sat here wishing I had a phone with individual resources/document groups for each app for full customisation and here you are, already making it :smile:

Always happy to help with that too if you want mate. Keeping locally is definitely the best idea, unless you can host the website to ensure it never goes down. Even then though, hosting providers / DNS aren’t always 100% reliable.

I’ll keep an eye on your profile for updates, really looking forward to it. Heres hoping you manage to finish it just in time for me to finish my UI :wink:

1 Like