any way to make a Force Spawn? sounds easy, like a 10 sec timer and then a ply:Spawn()
ive tried to make one but it keeps failing
help?
[lua]
if CLIENT then return end
if SERVER then
function RespawnWow(ply)
timer.Simple(10, function()
ply:Spawn()
end)
end
hook.Add( "PlayerDeath", "RespawnWow", RespawnWow )
end
[/lua]
Put that in a file in garrysmod/lua/autorun
Or
[lua]
function RespawnWow(ply)
timer.Simple(10, function()
ply:Spawn()
end)
end
[/lua]
serverside, sorry no tab :D
How will that work? RespawnWow is not a valid function and you didn't even hook it.
[QUOTE=Willox;23386995]Or
[lua]
function RespawnWow(ply)
timer.Simple(10, function()
ply:Spawn()
end)
end
[/lua]
serverside, sorry no tab :D[/QUOTE]
That does work, sorry, the way he said it made it sound like ply:Spawn() didn't work.
[QUOTE=Sylph;23387233]How will that work? RespawnWow is not a valid function and you didn't even hook it.[/QUOTE]
[lua]
if CLIENT then return end
if SERVER then
function RespawnWow(ply)
timer.Simple(10, function()
ply:Spawn()
end)
end
hook.Add( "PlayerDeath", "RespawnWow", RespawnWow )
end
[/lua]
o.o automerge fail
Im sure he can hook it himself so i didnt take the time to do it, it was a quick reply and im fairely busy
Note: you can use pl:Spawn() on players that are alive, so it will bring them back to the spawnpoint. I would check and see if the player is still dead before forcing them to spawn.
Sorry, you need to Log In to post a reply to this thread.