1: <?php
2:
3: declare(strict_types=1);
4:
5: /**
6: * Clansuite Server Query
7: *
8: * SPDX-FileCopyrightText: 2003-2025 Jens A. Koch
9: * SPDX-License-Identifier: MIT
10: *
11: * For the full copyright and license information, please view
12: * the LICENSE file that was distributed with this source code.
13: */
14:
15: namespace Clansuite\ServerQuery\ServerProtocols;
16:
17: use Override;
18:
19: /**
20: * Garry's Mod protocol implementation.
21: *
22: * Based on Steam/Source protocol.
23: */
24: class Gmod extends Steam
25: {
26: /**
27: * Protocol name.
28: */
29: public string $name = "Garry's Mod";
30:
31: /**
32: * List of supported games.
33: *
34: * @var array<string>
35: */
36: public array $supportedGames = ["Garry's Mod"];
37:
38: /**
39: * Protocol identifier.
40: */
41: public string $protocol = 'A2S';
42:
43: /**
44: * Garry's Mod player format: score as long (4 bytes), no skip, time as float.
45: */
46: public string $playerFormat = '/lscore/ftime';
47:
48: /**
49: * Garry's Mod uses standard Source engine protocol.
50: */
51: #[Override]
52: public function query_server(bool $getPlayers = true, bool $getRules = true): bool
53: {
54: // Use parent implementation
55: return parent::query_server($getPlayers, $getRules);
56: }
57: }
58: