Heya, i'm kinda making a ragdoll swep for fun and stuff. But i'm stuck at setting the spawn location when unspectating the ragdolled player.
"function SWEP:SecondaryAttack()
local tr = self.Owner:GetEyeTrace()
if ( tr.HitWorld ) then return end
function un_spectate(ply)
ply:UnSpectate()
end
ply:Spectate( OBS_MODE_NONE )
"
Thats my current code.. If it has some fail's or missing code, Please fill me up :)
[lua]ply:UnSpectate();
ply:SetPos(Vector(0, 0, 0));[/lua]
Set the player's position after calling UnSpectate.
Really? that's it? thanks man :)
[lua]function SWEP:SecondaryAttack()
local tr = self.Owner:GetEyeTrace()
if ( tr.HitWorld ) then return end
function un_spectate(ply)
ply:UnSpectate()
end
ply:Spectate( OBS_MODE_NONE )[/lua]
There also seems to be a problem with unclosed function and function in function.
wait what? function and function in function? thats like saying ill charge you if you dont charge me i can charge you for not charging me by charging me i cant charge you by charging me charge ... ye well you et it, didn't make any sense, you are saying the function might not work cause of some.. function problem.. (lol)