An easily configurable ped spawner for fivem servers. Supports animations as well if you have the patience to find one you like.
Installation:
- Place the file into the resources folder for your server.
- Add 'ensure ped_spawner' to your server.cfg
- Enjoy!
Configuration Options:
- Config.Invincible: Makes the peds invincible.
- Config.Frozen: Makes the peds unable to move.
- Config.Stoic: Makes the peds unaware of their surroundings.
- Config.MinusOne: If you need to subtract 1 from your Z-Axis coordinates when you grab them, set this to true. If you set it to false, all the default peds need to be adjusted.
- Config.Distance: The distance you want peds to be spawned/deleted at.
- Config.Fade: Allows peds to fade into/out of existence, rather than just popping in. The spawning process with this doesn't catch the eye as much.
Usage:
- To add another ped, just add a new line to the end of the config.
- The Ped Model names can be found here.
- A list of animations can be found here.
Below you can see an example of a code snippet you could use. Both the animDict and animName variables are completely optional.
{
model = "s_m_y_xmech_02",
coords = vector3(106.11213684082,6627.7666015625,31.787231445312), --PALETO BAY MECHANIC
heading = 20.0,
gender = "male",
animDict = "missmechanic",
animName = "work_base",
},
- Deletion of peds when player gets far enough away
- Took some of the config variables out of tables.