Download the PHP package dsg/squad-rcon-php without Composer
On this page you can find all versions of the php package dsg/squad-rcon-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package squad-rcon-php
Join the Squad RCON Community
If you have any questions or need help with getting started with RCON in OWI games you should make sure to join the Squad RCON Community on Discord.
Installation
You can install this package by using composer and the following command:
The code will then be available under the DSG\SquadRCON
namespace.
Commands
- [x] ListPlayers
- [x] ListSquads
- [x] AdminListDisconnectedPlayers
- [x] ShowCurrentMap
- [x] ShowNextMap
- [x] AdminKick "\<NameOrSteamId>" \<KickReason>
- [x] AdminKickById \<PlayerId> \<KickReason>
- [x] AdminBan "\<NameOrSteamId>" "\<BanLength>" \<BanReason>
- [x] AdminBanById \<PlayerId> "\<BanLength>" \<BanReason>
- [x] AdminBroadcast \<Message>
- [x] AdminRestartMatch
- [x] AdminEndMatch
- [x] AdminChangeLevel \<LevelName>
- [x] AdminSetNextLevel \<LevelName>
- [x] AdminChangeLayer \<LayerName>
- [x] AdminSetNextLayer \<LayerName>
- [x] AdminSetMaxNumPlayers \<NumPlayers>
- [x] AdminSetServerPassword \<Password>
- [x] AdminSlomo \<TimeDilation>
- [x] AdminForceTeamChange \<NameOrSteamId>
- [x] AdminForceTeamChangeById \<PlayerId>
- [ ] AdminDemoteCommander \<PlayerName>
- [ ] AdminDemoteCommanderById \<PlayerId>
- [x] AdminDisbandSquad \<TeamId> \<SquadId>
- [x] AdminRemovePlayerFromSquad \<PlayerName>
- [x] AdminRemovePlayerFromSquadById \<PlayerId>
- [x] AdminWarn \<NameOrSteamId> \<WarnReason>
- [x] AdminWarnById \<PlayerId> \<WarnReason>
- [x] AdminVoteLevel \<Choices, concatenated by +>
- [x] AdminVoteLayer \<Choices, concatenated by +>
- [x] AdminVoteNextLevel \<Choices, concatenated by +>
- [x] AdminVoteNextLayer \<Choices, concatenated by +>
- [x] AdminVote \<Vote name> \<Choices, concatenated by +>
USAGE
Create an instance
Instanciate the SquadServer class to open a new RCON connection. This will throw an Exception if no connection can be made.
Get current server population (Teams, Squads, Players)
Get the current population. This does use ListPlayers & ListSquads to get the Teams, Squads and Players properly ordered.
ListPlayers
Get the current Player list using the ListPlayers command. This does not include disconnected players.
Get disconnected Players
Get disconnected players using the ListPlayers command.
ListSquads
Get currently active squads (and teams)
AdminKick
Kick a player by name, SteamId or ingame id.
AdminBan
Ban a player by name, SteamId or ingame id.
Get the current map
Get the current map using the ShowNextMap command
Get the next map
Get the next map using the ShowNextMap command
AdminRestartMatch
Restart the current match
AdminEndMatch
End the current match
AdminBroadcast
Broadcast message to all players on the server
AdminChangeLevel
Change the level ( and pick a random layer on it) and travel to it immediately
AdminSetNextLevel
Set the next Level ( and pick a random layer on it) to travel to after this match ends
AdminChangeLayer
Change the layer and travel to it immediately
AdminSetNextLayer
Set the next layer to travel to after this match ends
AdminSetMaxNumPlayers
Set the maximum amount of players / slots
AdminSetServerPassword
Set the server password
AdminSlomo
Sets the game speed with the AdminSlomo. Default 1.0
AdminForceTeamChange
Forces a player to the opposite team by providing the name or steamid.
AdminForceTeamChangeById
Forces a player to the opposite team by providing the ingame Player id.
AdminDisbandSquad command.
Disbands a Squad by providing the Team id / index & Squad id / index.
AdminRemovePlayerFromSquad
Removes a Player from his Squad by providing the Player name.
AdminRemovePlayerFromSquadById
Removes a player from his Squad by providing the ingame Player id.
AdminWarn
Warns a Player by providing his name / steamid and a message.
AdminWarnById
Warns a Player by id.
Important Note
Make sure to always close the connection manually or trigger a disconnect by destructing the object to preventt blocking the RCON server by using up it'S available connections.
Special Thanks
- SquadSlovenia (Intial creators)
- Brozowski (Major contributor)
- [ToG] subtlerod (Major contributions to the used SquadRcon implementation)
- Thomas Smyth (Creator of SquadJS, a great resource for Squad RCON).
All versions of squad-rcon-php with dependencies
dsg/php-source-query-class Version 1.1.0
spatie/data-transfer-object Version ^3.8