public void OnEnterColshape(IColShape colShape, IEntity entity, bool state) { if (!state) { return; } if (colShape.HasData("warehouse:data")) { Alt.Log("Przechodze po HasData"); if (entity is IPlayer player) { Alt.Log("Colshape ma dane warehouse"); colShape.GetData("warehouse:data", out WarehouseEntity warehouseEntity); if (warehouseEntity == null) { return; } CharacterEntity characterEntity = player.GetAccountEntity().characterEntity; if (characterEntity.CurrentDeliveryOrder != null) { new Interaction(player, "warehouse:deliverOrder", "aby dostarczyć paczkę"); } } } }
public void OnPlayerEnterColshape(IColShape colShape, IEntity entity, bool state) { if (entity is IPlayer player) { if (colShape.HasData("job-center:data")) { if (state) { colShape.GetData("job-center:data", out JobCenterEntity jobCenterEntity); player.SetData("current:job-center", jobCenterEntity); new Interaction(player, "job-center:showWindow", "aby otworzyć menu urzędu pracy"); } else { player.DeleteData("current:job-center"); } } } }
public void OnPlayerEnterColshape(IColShape colShape, IEntity entity, bool state) { if (entity is IPlayer player) { if (state) { if (colShape.HasData("trash:data")) { CharacterEntity characterEntity = player.GetAccountEntity().characterEntity; colShape.GetData("trash:data", out TrashPointModel trashPoint); if (characterEntity.CurrentTrashPoint != null) { if (characterEntity.CurrentTrashPoint.Id == trashPoint.Id) { new Interaction(player, "job-junker:dump", "aby opróżnić kosz na śmieci"); } } } } } }
public static BusEntity GetBusEntity(this IColShape colshape) { colshape.GetData("bus:data", out BusEntity bus); return(bus); }
public static void OnEntityColshapeHit(IColShape shape, IEntity entity, bool state) { if (shape.Exists == false || entity.Exists == false) { return; } if (entity is Player player) { if (player.HasData("CHANGING_DUELL")) { return; } if (player.CurrentDuell != null) { if (state) //ENTER { player.SendNotificationGreen("Zone betreten!"); player.InCircle = true; } else //EXIT { if (player.CurrentDuell.Attacker == player) { player.CurrentDuell.StartOutOfCircleTimer(player, player.CurrentDuell.Defender); } else { player.CurrentDuell.StartOutOfCircleTimer(player, player.CurrentDuell.Attacker); } } } if (shape.GetData("GARAGE", out int id)) { if (player.CurrentMode == "team") { if (player.TeamId == id) { if (state) { player.SendNotificationGreen("E um ein Fahrzeug aus zu parken.."); } } } } if (shape.GetData("SPAWNZONE", out int spawnZoneId)) { if (player.CurrentMode == "team") { if (player.TeamId != spawnZoneId) { if (state) { player.SendNotificationRed("Du befindest dich in einem Gegnerischen Spawn.. verschwinde oder du wirst gegickt.."); player.StartInSpawnZoneTimer(); } else { player.InOtherTeamZone = false; player.SendNotificationGreen("Wieder außerhalb dem Spawn."); } } } } } }
public static AtmEntity GetAtmEntity(this IColShape colshape) { colshape.GetData("atm:data", out AtmEntity entity); return(entity); }
public static BuildingEntity GetBuildingEntity(this IColShape colshape) { colshape.GetData("building:data", out BuildingEntity result); return(result); }
public static ShopEntity GetShopEntity(this IColShape colshape) { colshape.GetData("shop:data", out ShopEntity shopEntity); return(shopEntity); }