void DoAfterDeath(PlayerSession session, PlayerSession killersession) { GGPlayer par = FindGP(killersession).FirstOrDefault(); par.kills++; stats(session, 2f); if (_config.settingsGame.noticekill) { notice(killersession, string.Format(Msg("GG_Notice_Kills", killersession.SteamId.ToString()), par.kills, _config.game.kol)); } int step = par.getStep(_config.game.kol); if (step >= _config.game.weapons.Count()) { StopGGW(killersession); return; } InvClear(killersession); givew(killersession, step); Broadcast(string.Format(Msg("GG_A_NextWeapon"), killersession.Identity.Name, _config.game.weapons[step].itemname)); if (_config.game.warlast && step == _config.game.weapons.Count() - 1) { Broadcast(Msg("GG_A_LastWeapon").Replace("{0}", killersession.Identity.Name)); } InvClear(session); }
void OnPlayerRespawned(PlayerSession session, Vector3 pos) { if (deathsForSpawn.Contains((ulong)session.SteamId)) { deathsForSpawn.Remove((ulong)session.SteamId); exitp(session); } if (!arenastart) { return; } var fnd = FindGP(session); if (fnd.Count() == 0) { return; } var itemmanager = Singleton <GlobalItemManager> .Instance; GGPlayer par = fnd.First(); var ehs = session.WorldPlayerEntity.GetComponent <EquippedHandlerServer>(); int step = par.getStep(_config.game.kol); givew(session, step); Teleport(session, GGSpawn()); }