Need help with getting all lossers on Mr Gash deathrun

im trying to get all lossers in Mr Gash gamemode i tried this (none of the below worked for me)


local lossers = {}
				for k, plol in pairs(team.GetPlayers(not winner)) do 
					if not plol:Team() == TEAM_SPECTATOR then 
						table.insert(lossers, plol)
					end
				end

and also tried this


local lossers = {}
				for k, plol in pairs(team.GetPlayers(!winner)) do 
					if not plol:Team() == TEAM_SPECTATOR then 
						table.insert(lossers, plol)
					end
				end


and also this


local lossers = {}
				for k, plol in pairs(player.GetAll()) do
				if not team.GetPlayers(winner) and not plol:Team() == TEAM_SPECTATOR then 
						table.insert(lossers, plol)
					end
				end

im trying to get the lossers to reward them some points for just playing

Can you post full code? Specifically the hook you’re doing this in.

team.GetPlayers return a table, it doesn’t make sense doing team.GetPlayers(not 2) since you want to check players that not are in winner team, just loop trhough all players and check if team is not the same than winner or spectator

U mean something like this yh?


local lossers = {} 				
for k, plol in pairs(player.GetAll()) do 				
if not team.GetPlayers(winner) or not plol:Team() == TEAM_SPECTATOR then 						
table.insert(lossers, plol) 					
end 				
end

Sorry for terrible layout not home trying to do it on mobile

[editline]2nd August 2017[/editline]

The hook I’m using is the round hook that is in the hooks file in the game mode with function (round, winner) I will be able to tell you the exact hooks when I get home but I’m only using this one hook

I’ll help you because i REALLY feel like you’re trying

[lua]

for k,v in pairs(player.GetAll()) do
if(v:Team() != winner and v:Team() != TEAM_SPECTATOR) then
MsgN(v:Nick()," is a loser!")
end
end

[/lua]

omg thank you so much thats all i had to workout how to do i already had the winning points bonus for winning without anyone dieing on your team reward for dead members of your team just had to work this one out thank you so much i was trying to work this out for 2 days