From b1d365ecb8abac75d006e4084f75ec36dea4c0db Mon Sep 17 00:00:00 2001 From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com> Date: Mon, 30 Jun 2025 00:04:58 +0200 Subject: [PATCH] Implement default knife display logic in index.php to ensure a knife is always shown, enhancing user experience by providing a fallback option when no knife is selected. Update HTML comments for clarity. --- website/index.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/website/index.php b/website/index.php index 1b3f2e0e..61b703c9 100644 --- a/website/index.php +++ b/website/index.php @@ -234,9 +234,15 @@ if (isset($_SESSION['steamid'])) { } } } + + // If no knife selected at all, show default knife + if (!$displayKnifeSkin && !$displayKnife && isset($knifes[0])) { + $displayKnife = $knifes[0]; // Default knife + $knifeSource = 'default'; + } ?> - +
@@ -259,7 +265,6 @@ if (isset($_SESSION['steamid'])) {
- $weapon): ?>