SetPos issue...

Hi guys,
I am having an issue with SetPos. It works, I don’t have errors, but I always spawn in the ceiling.
I used another player team which has no set spawn points and it works fine, but I don’t know how to get the position perfectly.
Even using GetPos and inputting the dimensions in my script do nothing to fix this.
Thanks comerades! :zoid:

Show your code.

Saw your last post.
When you use “getpos” in console you need to take 62 away from the Z Vector to get your position on the ground.
An alternative would be to type:
lua_run_cl print(LocalPlayer():GetPos()) in console or just use another method of using Entity:GetPos().

[LUA]function PickSpawnPoint()
for k, v in pairs(player.GetAll()) do
if v:Team() == 1 then
v:SetPos(Vector(1624.104004, 411.128082, 72.031250))
elseif v:Team() == 2 then
v:SetPos(Vector(1032.512207, 411.510010, 72.031250))
end
end
end
[/LUA]

[editline]8th August 2012[/editline]

Nevermind, I fixed it :slight_smile:
Thanks for the good tip! Very useful!