Garry's Mod

Garry's Mod

Borderlands New-U Station
Simone 11 Jul, 2019 @ 6:44pm
Patch for DarkRP
Add to [extracted addon]/lua/autorun/server/borderlands.lua:

hook.Add("PlayerDeath", "SetRespawnPos", function(ply) if !IsValid(ply) or !ply.SelectedSpawn or !IsValid(ply.SelectedSpawn) then return end ply.SpawnPos = ply.SelectedSpawn:GetPos() + Vector(50,0,0) end) hook.Add("PlayerSelectSpawn", "Respawn on dead pos", function(ply) if !IsValid(ply) or !ply.SelectedSpawn or !IsValid(ply.SelectedSpawn) then return end return false, ply.SpawnPos end)
< >
Showing 1-3 of 3 comments
Fade 7 Feb, 2021 @ 1:05am 
Is there a way to still show the animation using this hook?
Simone 7 Feb, 2021 @ 12:45pm 
It's been a while so I'm not sure. I'm pretty sure darkrp uses a different system for when players die, so you would have to find the code for the animation and paste it into a new hook that darkrp could understand.
Last edited by Simone; 7 Feb, 2021 @ 12:45pm
if this is possible it would be amazing if someone added a cash penalty for respawning like borderlands lol
< >
Showing 1-3 of 3 comments
Per page: 1530 50