[Release] Spawn

About the script

  • This is a highly optimized script compared to others that can be found that manages the player’s position at disconnection and reconnection. Where other scripts make a SQL query, this one saves them intelligently.

  • The basic configuration performs a backup of all players every 10 minutes. Other backups are mainly handled when the player logs off or when the /save command is executed in the console (useful for restarting the server). You can change the configuration as you wish.

  • He is compatible with all SQL databases. You just will need to enter the name of your lastPos column of your database inside the server/config.lua file. It will also treat your lastPos field to use it (be it an array, a string, a null value, etc …) Don’t be unhappy because you don’t have the same type of column as the others! :wink:

  • The script will automatically look for the latest version and notify you when a new update is available (possibility to disable this).


Overview of the configuration file


Installation
  • Download the script. (4.6 KB)
  • Add start spawn to your server.cfg.
  • Set the configuration in the server/config.lua file.
  • Have fun !

Do you have a problem with the script ?

If you encounter a general problem or a personal problem, contact me and I will try to help you!


About me

  • I am a French developer.
  • Programming languages that I know: Html5 / Css3 / Php / MySQL / Lua.
  • I’m currently training to become a php / symfony application developer

I’m currently looking for a developer who can help me develop some scripts because i’m short of time.
I can also help you learn development on fivem because i’m generous.

13 Likes

So this script spawns you at your last location on death?

1 Like

No, basically this saves your last position to your dB
The Big advantage is its fully configurable without any Lua knowledge

2 Likes

Do you want an option for that ?

just confused by the name Deed,

Deed, a legal document that is signed and delivered, especially one regarding the ownership of property or legal rights.

                             **or**

Deed an action that is performed intentionally or consciously, As in a brave or noble act.

2 Likes

Oh no, it’s just the beginning of my pseudo … :eyes:

Thank you <3 <3 <3 <3

1 Like

With pleasure Sir ! [20 characters]

Hi!

Is there a possible way to like update it every 10 secs?
If so, how? cant get it to work… :\

Thanks!

Hello delanootje,

You can customize the configuration of the time between the updates in the config.lua file.

image

But every 10 seconds it is not recommended :

To explain the operation in more detail:

All players have their own object. The position of the object (for each player) is saved every 6 seconds. This is the system for saving SQL queries to the database.

To save the position in the database this happens every 10 minutes (by default), when a player disconnects or when the server administrator executes the save command in the console.

Hi!

It needs to be around 10 secs or less, im making a dispatch system for fiveM(To monitor cars on screen) so i need to update the position every 10 seconds or less.

Why you don’t use an object ?

how do u mean object?

Not a real object, just like self and rTable you know ?

Hotfix :

  • Fix a little bug

Using this in my server and getting reports of getting stuck or frozen in place and they wind up having to kill themselves to fix it

i got this, but i always spawn in a random place, can someone help me?

Thanks for the better understanding of how to switch to 10 miniyes

can you help on configurate my server?
how i add one Jobs ? sql? first i need what? i just have a server… not configured,…

No, sorry. There are many topics that answer this question on the forum. Search a little, you will find your happiness :wink: