Displaying player information for OneSync: Infinity/BigMode
-
I have no idea if anyone has done this before, and posted it on the forum, but I decided to share
-
Here we use the implementation via scope, which is made for OneSync: Infinity/BigMode, and if the player is in your scope, then you immediately receive data, if in another scope then you receive data from the server
-
I’m not going to post it on github, because I’m not going to support it either
-
It’s just like a cheat sheet on the implementation of such things.
Youtube
onesync-player-ids.rar (2.1 KB)
4 Likes
Hi, why not using the gamertags that were created for this purpose?
Also you could use statebags instead of relying on a server loop!
Hello, this code was written in the year 2021, when there were no statebags, or I didn’t know about them then
As for gamertags, I’m not sure that a large amount of information can be transferred there. I used this draw to display the player’s HP, armor, his ID in the database, his name, through “Name \n Health \n Armor”
This is just an example of how I used it, maybe someone will need it as an example in their development
I just don’t quite understand how, without iterating over the players on the server, I can get them all on the client, when only those that are in my scope are returned to me
A remark about statebags that is not entirely clear to me, if you expand on the topic in more detail, I’ll rewrite my script and upload it if it’s really more optimal than my solution
I don’t see the point in releasing such an old script but heh, you can do whatever you want 
Gamertags allow you to show health and armor, as well as a custom text above an entity’s head.
For your second message, why would you need informations about a player that is not in your scope ? Using statebags, you could just loop through the players in your scope and get their statebag that you filled previously with the necessary data (tho you can get health, armor, name and server ID from the entity) and create a gamer tag there
Here is some useful reading for you :
https://docs.fivem.net/docs/scripting-manual/networking/state-bags/
and
Okay, we’ve sorted out the gamer tag, this is useful advice, which probably increases optimization by rendering a different type, which affects resmon
Why do I need to see all the players? Well, if I’m an administrator, and I don’t want to open the map every time and watch blips and mess around, I can just fly through the nicknames that I see. Can Statabag help with this?)
I read about the state bag, so I can say that in this case, when I want to see all the nicknames on the map, it won’t help me)
Even as administrator, you don’t have all the players in your scope do you ? The administrator will only see the gamertag of the players that are close to him