Player:GetWeapons() seems to return an nil entities after dropping a weapon in DarkRP.

I am making a weapon selection menu.
When i do /dropweapon, Player:GetWeapons() will return a nil in the place of that weapon.

What it looks like: // Before // After

Code: (It’s a bit ugly)

Before drawing the weapons, loop through the table and remove the invalid weapons.

i tried that before, i think the table still had a wrong count. I was using table.remove()
And anyways, then i couldnt use Player:SelectWeapon() :c

Have you looked into how TTT handles this?

Seems ttt work another way

[editline]7th December 2013[/editline]

You mean to check the valid weapon or not then remove it or what?

for k, v in pairs(src) do
if IsValid(v) then
table.insert(dest, v)