[Project] FiveM Battlegrounds (OneSync support)

Hello, I wanted to share my new gamemode. I started working on this project month ago and I decided to publish it to find the motivation to finish it one day :slight_smile:

Github FiveM Battlegrounds

The gamemode is not finished but is working. It does work on onesync, but I may have things to fix.
The gamemode has been tested with dozens of players.

You can find below some previews ->

  • How the zone shrinking, a random zone is selected and the latest zone closes on the new one. You will see a giant marker around… or behind you. (like BR games)
    https://streamable.com/0sszx

  • In the plane

  • HUD

  • The first ‘map’

Do not hesitate to contribute or test it!

7 Likes

Wow, This looks AMAZING. Can’t wait until I have some free time & be able to contribute :slight_smile:

Looking Amazing!

Be Fast PLZ xD İ Want Try This Gamemode!

It’s amazing work, man.
Keep going, this should be popular!

This is incredible

I’m going to open a BR server soon

Please keep this open source, are you allowing for others to use this project as well I have some cool
Idea do with this along with new maps

Gamemode in production here: 149.202.65.148:30150

one issue ive noticed is when you win the game nothing happens you just sit there no win

yes the “kill event” was broken.
It should be fixed by now

I like that this is unique, good work for sure @PichotM.

1 Like

here is the next issue after the update the game wont start at all

are you sure you use the latest version ?

Yes sir all updated cleared cache and all

My humble collaboration. Problems with players that do not have steam, solved this way

Need to change table primary key to rid

function BR:PlayerJoined(intSource)
	--local identifiers, playerName = GetPlayerIdentifiers(intSource), GetPlayerName(intSource)
	--local hex, rockstarID, IP, userPack = identifiers[1], identifiers[2], GetPlayerEndpoint(intSource), {}
	
	local identifiers = GetPlayerIdentifiers(intSource)
	
	for k,v in pairs(identifiers) do
	
		if string.match(v, "steam") then
			hex = identifiers[k]
		elseif string.match(v, "license") then
			rockstarID = identifiers[k]
		elseif string.match(v, "ip") then
			IP = identifiers[k]
		end
	
	end
	
	playerName = GetPlayerName(intSource)
	userPack = {}
	
	local userExist = SQL_QueryResult("SELECT * FROM br_players WHERE rid = @rid", { ["rid"] = rockstarID })
	userExist = userExist and userExist[1]

	if not userExist then
		print(intSource .. " does not exist.")
		SQL_Query("INSERT INTO br_players (`hex`, `rid`, `ip`, `name`) VALUES(@hex, @rid, @ip, @name)", {
			["hex"] = hex,
			["rid"] = rockstarID,
			["ip"] = IP,
			["name"] = playerName
		})

		userExist = { hex = hex, rid = rockstarID, ip = IP, name = playerName }
	end

	userPack.model = userExist.model

	print("User exist -> " .. json.encode(userExist))
	connectedPlayers[intSource] = true
	TriggerClientEvent("postJoin", intSource, userPack)
	TriggerClientEvent("BR:UpdateData", intSource, { StartTime = self.StartTime })
end

Do you have SQL?

SQL code is in the readme; GitHub - PichotM/fivem-battlegrounds: FIVEM BATTLEGROUNDS - CONTRIBUTE

Hi, i have a problem. When me and my friends joins server we are teleported to zancudo, then after 30 sec when game starts we have black screen and nothing happens. In the upper right corner is 0 players but there are players. If someone know solution for this i would appreciate it.

Im having a problem with the database, this is the error im getting Imgur: The magic of the Internet

1 Like