ID Character Saver

Hello I need some help with a script / resource that I want on my server
Basicly I need a script that saves every single player’s ID. Example if I joined the server I have the ID 1 and if someone from the past joined he would have the exact same ID that he had when he joined the server for the first time.
Example 134 ID and that would not change at all. I need the script to handle the players, so we know who’s breaking rules and stuff. :smiley:

Peace out
Btw this is my first topic.

Hi,

Create a table in your database (or a json file if you prefer :wink: ) with 3 column: player_identifier, id, connected_date.

Then, when the player is connected, just insert in the table :yum:

Like this?
https://gyazo.com/0726b1c7e0bef4ae90449e5c63677e62

player_identifier: varchar(64) -> 64 is length, so depends on what you store in
id: int -> good :wink:
connected_date: datetime

https://gyazo.com/26cce8b479ad029ecec7c9eaa0df9bab

So I do not need a file in the server for this to work? It should just do it automatic? :smiley:

You need a script to save that :wink:

Fuck, I’m pretty bad at coding, you wanna help sort it out?

Which mysql resource are you using?

I aim using MariaDB :slight_smile: A normal sql database :slight_smile:

Yes, but I’m ask for the resource that connect fiveM to your db :wink: