mirror of
https://github.com/Xerasin/Sit-Anywhere.git
synced 2025-03-04 03:13:07 -05:00
Remove sitanywhere vehicle on death
This commit is contained in:
parent
1920aa5e75
commit
ff1c05fd07
@ -624,7 +624,12 @@ hook.Add("AllowPlayerPickup","Nopickupwithalt",function(ply)
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("PlayerDeath","SitSeat",function(pl)
|
||||
hook.Add("PlayerDeath", "SitSeat", function(pl)
|
||||
local veh = pl:GetVehicle()
|
||||
if IsValid(veh) and veh.playerdynseat then
|
||||
SafeRemoveEntity(veh)
|
||||
end
|
||||
|
||||
for k, v in next, pl:GetChildren() do
|
||||
if IsValid(v) and v.playerdynseat then
|
||||
SafeRemoveEntity(v)
|
||||
|
Loading…
Reference in New Issue
Block a user