PivityGmodStore

SpawnPointManager • DarkRP, Helix, Nutscript & Sandbox

(10)(99)

You can always read the reviews or discuss this product

Dennis ٩(๏̯๏)۶Authorposted edited

You're right, the error crept in with the v1.1 update (at least for Helix and Nutscript)!

Thanks for the info, it is fixed in v1.4.

Private Ryanposted

weapons/gmod_tool/stools/spawnpointmanager_tool.lua

Errors on lines 74 and 83. You forgot to switch "job" with "faction"

SkepticPurchasedposted

That’s perfect thanks, appreciate the fast responses!

Dennis ٩(๏̯๏)۶Authorposted

Heyho,

yeah, that’s definitely possible.

However, I was more focused on finding a non-specific solution that addresses all potential issues related to using the same hook, rather than implementing fixes for specific functions. Unfortunately, my tests showed that it’s not that simple, and renaming didn’t solve the problem either!

So, I uploaded a version (v1.2) where the DarkRP arrest issue is fixed.

SkepticPurchasedposted

Shouldn’t it be possible to add a check on spawn to see if the player is arrested then return false if so letting DarkRP manage arrested players spawn points? I noticed this is happening on my server too.

Dennis ٩(๏̯๏)۶Authorposted edited

Hey there,

this issue arises when multiple addons use the same hook. The SPM relies on the PlayerSelectSpawn hook to assign a position to the player before they spawn. However, when other addons use the same hook, conflicts can occur because the player is assigned to the position set by the script whose hook runs last (presumably). Some scripts also set the spawn position using the PlayerSpawn hook, but this is always executed after PlayerSelectSpawn and should typically override the SPM spawns.

This makes resolving conflicts tricky, as the desired priority can vary depending on the situation. A potential workaround might be to rename the hook. If multiple hooks with the same name are being used, the one that is alphabetically first is (to my knowledge) executed first.

For example: "DarkRP_PlayerArrestedSpawn" > "SPMSpawnSystemSelectSpawn" = First the DarkRP arrested spawn is set, then it is overwritten by the SPM spawn.Therefore, renaming the SPM hook with a prefix like A_ or Z_ might help resolve these conflicts.

You could try this and let me know if it works. If it does, I could consider adding this option to the configuration. The hook is located in the file sv_spawnpointmanager.lua at line 286. You would need to replace "SPMSpawnSystemSelectSpawn" with something like "A_SPMSpawnSystemSelectSpawn" or "Z_SPMSpawnSystemSelectSpawn" and restart the server. This should allow you to test whether the priority changes.

(Another way to ensure this issue is resolved—although it’s more complex and less user-friendly—would involve adding a delay (timer.Simple ~0.1) to the hooks in scripts of the addons that need to have prioritized spawns. This would ensure that their hook is always executed last. However, implementing this requires knowledge of where these hooks are located in the respective scripts.)

Let me know how it goes!

Cheese ManPurchasedposted

Notice with darkrp this will break jail positions seemingly as after being arrested i would instead go to spawn. Also a niche interaction but the tac insertion from call of duty also gets overwritten

Dennis ٩(๏̯๏)۶Authorposted edited
  1. Unfortunately, I can't answer that definitively as I am not familiar with "WiltOS passive event system spawn points." It depends on whether this system uses the Playerspawn hook (in which case they won't be overridden) or the PlayerSelectSpawn (hook which may overrides). However, by adding a slight delay to the respective hook, it should be possible to determine which system has priority.
  2. This isn't directly supported, but it could be achieved with a workaround. My system allows you to set a "world spawn / default spawn point" where all players spawn if no specific job spawn is defined. With a simple script modification (I can help you), you can switch the priority to world spawn > job spawn. During events, you could then set, delete, or move the world spawn to ensure that all players spawn at the designated world spawn points.
Heliosposted

2 Questions:


  1. Will this overwrite WiltOS Passive Event System spawn points?
  2. Can we create Event spawns for roleplay servers such as Star Wars RP?
  3. Context: Would like an easier way to update player spawns as an event moves forward, does this have a function where you can set a spawn point for everyone, once you set a new spawn point, it removes the previous set spawn.
Dennis ٩(๏̯๏)۶Authorposted

Unfortunately, this is currently not planned; a random point is chosen from the selection. Maybe there will be the option to activate this optionally in the future. But other functions have priority.

Boogieposted

any ability to choose your spawn through a menu when you die?

Yoh Sambreposted

this stuff is great o/

Dennis ٩(๏̯๏)۶Authorposted

Heyho ^^

currently, this function is only available in Sandbox, because I thought it was enough to be able to set the spawn of the JoinJob for other gamemodes. However, this does not cover your scenario, so it is a good idea to have this option in all game modes. I would try to implement this either today or in the next few days and will get back to you here.

SkepticPurchasedposted

Does this allow you to place spawn multiple positions for everyone regardless of their job? If I wanted to change spawn from one part of the map to the other for example

dampposted

First