Help with a script

Does anyone know how to make a script that reads steam id but allows a player to set cars at the dealer and set a price to buy it and the money goes to the player that sets them?

It’s definitly possible, but it’s not a single/simple “script”, you need to design a system for it that does this. There is a native to get the player identifiers. https://runtime.fivem.net/doc/reference.html#_0x7302dbcf

In before, it’s not a simple script that I can share on the forums, if you want to have such a system I recommend writing your own or a similair existing resource.

If I were to create this feature, I would come up with several things that need to happen, something like this:

  • Using the GetPlayerIndentifiers() native to get the steam id.

    • Fetch the steam id to see if the player is the owner (database? plain text? etc.)
  • Store the car dealership information

    • Who is the player owning the dealership?
    • What is the current car on sale?
    • What does the car cost
    • Store the information stated above (again db? plain text? json? xml? etc.)
  • How will the player interact with the dealership (marker? command?)

  • Buying a car

    • How does this thigh into the current economy resource (i.e. how will the money get withdrawn).
    • Does this affect the dealerships stock?
    • How about going about giving money to offline players? (probably save the money in a db).

As you can see, there are quite some point to cover. My tip is to workout most of the unknowns, get a clear description of what you are trying to achieve. Also using the agile methodology would make defining the use cases or requirements easier.

After determining that, find out if you are capable of making it your own or you want to outsource it to an actual developer.