diff --git a/lib/games.js b/lib/games.js index 97a3436..434638a 100644 --- a/lib/games.js +++ b/lib/games.js @@ -2446,7 +2446,7 @@ export const games = { release_year: 2019, options: { port: 7777, - protocol: 'samp' + protocol: 'gtasao' }, extra: { old_id: 'saomp' diff --git a/protocols/index.js b/protocols/index.js index 8156718..cb34d55 100644 --- a/protocols/index.js +++ b/protocols/index.js @@ -19,6 +19,7 @@ import gamespy2 from './gamespy2.js' import gamespy3 from './gamespy3.js' import geneshift from './geneshift.js' import goldsrc from './goldsrc.js' +import gtasao from './gtasao.js' import hexen2 from './hexen2.js' import jc2mp from './jc2mp.js' import kspdmp from './kspdmp.js' @@ -58,7 +59,7 @@ import theisleevrima from './theisleevrima.js' export { armagetron, ase, asa, assettocorsa, battlefield, buildandshoot, cs2d, discord, doom3, eco, epic, factorio, farmingsimulator, ffow, - fivem, gamespy1, gamespy2, gamespy3, geneshift, goldsrc, hexen2, jc2mp, kspdmp, mafia2mp, mafia2online, minecraft, + fivem, gamespy1, gamespy2, gamespy3, geneshift, goldsrc, gtasao, hexen2, jc2mp, kspdmp, mafia2mp, mafia2online, minecraft, minecraftbedrock, minecraftvanilla, mumble, mumbleping, nadeo, openttd, palworld, quake1, quake2, quake3, rfactor, samp, savage2, starmade, starsiege, teamspeak2, teamspeak3, terraria, tribes1, tribes1master, unreal2, ut3, valve, vcmp, ventrilo, warsow, eldewrito, beammpmaster, beammp, dayz, theisleevrima diff --git a/protocols/samp.js b/protocols/samp.js index 517a904..cc45abd 100644 --- a/protocols/samp.js +++ b/protocols/samp.js @@ -7,6 +7,7 @@ export default class samp extends Core { this.magicHeader = 'SAMP' this.responseMagicHeader = null this.isVcmp = false + this.isOmp = false } async run (state) { @@ -40,13 +41,14 @@ export default class samp extends Core { // read players // don't even bother if > 100 players, because the server won't respond if (state.numplayers < 100) { - if (this.isVcmp) { + if (this.isVcmp || this.isOmp) { const reader = await this.sendPacket('c', true) if (reader !== null) { const playerCount = reader.uint(2) for (let i = 0; i < playerCount; i++) { const player = {} player.name = reader.pascalString(1) + player.score = reader.int(4) state.players.push(player) } }