function duel.EndDuel(pl, winner, nowinner) if not nowinner then if ValidEnt(pl.Opponent) then if winner then pl:addMoney(pl.Wager * 2) else pl.Opponent:addMoney(pl.Wager * 2) end else pl:addMoney(pl.Wager) end end duel.Spawns[game.GetMap()][pl.Arena].BeingUsed = false if not nowinner then bizzylib.notifyplayer(player.GetAll(), Color(255, 25, 25), pl:Name(), color_white, ' has ' .. (winner and 'won' or 'lost') .. ' a duel against ', Color(255, 25, 25), (ValidEnt(pl.Opponent) and pl.Opponent:Name() or 'DISCONNECTED') .. '!') end pl:SetNetVar('duel.IsDueling', false) pl:StripWeapons() pl:Spawn() if pl.Opponent and IsValid(pl.Opponent) then pl.Opponent:StripWeapons() pl.Opponent:Spawn() end if ValidEnt(pl.Opponent) then local opp = pl.Opponent opp:SetNetVar('duel.IsDueling', false) opp.Opponent = nil opp.Wager = nil opp.Arena = nil end pl.Opponent = nil pl.Wager = nil pl.Arena = nil end function duel.Check(pl, wager) if not pl:canAfford(wager) then return false end if pl:GetNetVar 'duel.IsDueling' then return false end return true end