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.
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.
weapons/gmod_tool/stools/spawnpointmanager_tool.lua
Errors on lines 74 and 83. You forgot to switch "job" with "faction"
That’s perfect thanks, appreciate the fast responses!
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.
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.
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!
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
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.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.2 Questions:
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.
any ability to choose your spawn through a menu when you die?
this stuff is great o/
Done!
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.
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
First