So first lemme give you da code
for k,spawnLocation in pairs(spawns) do
ply:PrintMessage( HUD_PRINTTALK, "Checking every spawn position in data... Current positon: " .. tostring(spawnLocation) )
if spawnLocation == br_spawn:GetPos() then
ply:PrintMessage( HUD_PRINTTALK, "Found exact position in data! Removing..." )
spawns[k] = nil
br_spawn:Remove()
ply:PrintMessage( HUD_PRINTTALK, "Spawnpoint removed." )
break
else
ply:PrintMessage( HUD_PRINTTALK, "Wrong position..." )
end
end
And the problem is when comparing position of the “br_spawn” with “spawnLocation” it just doesn’t let through, the code underneath isn’t ran. And the message “Wrong position…” is shown…
ply:PrintMessage( HUD_PRINTTALK, "Wrong position..." )
if spawnLocation == br_spawn:GetPos() then
Why is that happening?
Thanks.