• Description:
- You must have already heard of the Battle Royale games which are taking over the planet, yes, I'm talking about PUBG and Fortnite.
This mod revamps the default game play into a new survival game play, where you have to kill everyone to survive.
• Information regarding the mod
- The mod now supports any map, you only have to create spawn points/origins for the Airplane, Zone and Weapons/Healings, for which you will have a tutorial in the next post.
• Requirements:
• Official HLDS, you can't use this mod if you're using ReGameDLL.
• Orpheu (I've tested using latest version).
• Random Origin Generator by HamletEagle. (if using automatic spawn points)
• Features
Battle Royale (Team up with your friends or go alone in the battlefield)
Air Plane dropping (All players spawn into an airplane from where they can jump)
Random dropped weapons and healings
Fake teams (You're able to create up to 32 teams)
Customizable API (Almost everything is changeable through .ini files)
Round Manager (Will take care of the game play, no admins needed in the server)
Red Zone (Seen in Fortnite [storm], players outside of the zone will take damage)
A lot more, find out for yourself.
• Configuration Files:
Spoiler
• CSBR_Healings.ini
Code:
Here you decide what kind of custom entities you want to spawn, I've added some by default so you can figure out how it works.
There's 2 types of entities:
1. ItemType_MedKit
2. ItemType_Drink
ItemType_Medkit gives user max health (you can change it via CVAR), but it takes longer to use.
ItemType_Drink gives user a certain amount of HP (also changeable via CVAR), and takes shorter to use.
You can also specify the count of the item you want to spawn (more info inside the .ini file)
• CSBR_Models.ini
Code:
Here you set your desired models for the AirDrop, Airplane.
AIRDROP_MODEL_FLYING - Model of the airdrop while it's flying
AIRDROP_MODEL_GROUND - Model of the airdrop while it's on the ground
AIRPLANE_MODEL - Model of the airplane
• CSBR_HUDs.ini
Code:
Here you can change the position, color, refresh rate of the existing HUDs.
• CSBR_Sounds.ini
Code:
Here you can change the sounds of the gameplay,
PARACHUTE_DEPLOY_SOUND - Sound when you jump out of the plane
LANDING_SOUND - Sound when you land on the ground/in water
AIRDROP_APPEAR_SOUND - Sound when airdrop appears
AIRDROP_LAND_SOUND - Sound when airdrop lands
• CSBR_WeaponModels.ini
Code:
Here you can change the V_ P_ and W_ models of every weapon.
• CSBR_Weapons.ini
Code:
Here you decide what weapons to spawn and their rarity glow.
You can't spawn weapon_c4 and weapon_kevlar.
Rarity glows:
- RARITY_GREY
- RARITY_GREEN
- RARITY_BLUE
- RARITY_PURPLE
- RARITY_GOLD
• Commands
Spoiler
Code:
say /backpack | say /bp - Opens your backpack
say /track - Keep track of spawned entities (optional)
IN_USE - Use a heal, just press no need to hold.
IN_JUMP - Jump from the airplane.
say /sp | say /spawn_points - Opens menu to add new spawn points
say /pd | say /plane_directions - Opens menu to add new plane directions
say /zo | say /zone_origins - Opens menu to add new zone origins
• API:
Spoiler
• cs_battleroyale_faketeams.inc
Code:
#define NO_TEAM 0
/* * * * * * * * * * * * * * * * * * *
* Returns a Player's Team ID
*
* @param id Player ID
* @return Team ID on success, -1 on Invalid Player ID
* * * * * * * * * * * * * * * * * * */
native GetPlayerTeam( id )
/* * * * * * * * * * * * * * * * * * *
* Sets a Player's Team ID
*
* @param id Player ID
* @param iTeam Team ID to set
* @return 1 on success, -1 on Invalid Player ID
* * * * * * * * * * * * * * * * * * */
native SetPlayerTeam( id, iTeam )
/* * * * * * * * * * * * * * * * * * *
* Returns Max Teams number
*
* @return Max Teams ID
* * * * * * * * * * * * * * * * * * */
native GetMaxTeams( )
/* * * * * * * * * * * * * * * * * * *
* Sets Max Teams number
*
* @param iValue Value to set
* @return 1 on success, -1 on Invalid Number (1-MaxPlayers)
* * * * * * * * * * * * * * * * * * */
native SetMaxTeams( iValue )
/* * * * * * * * * * * * * * * * * * *
* Gets number of players in a specified team.
*
* @param iTeam Which team
* @return Team on success, -1 on Invalid Team (1-MaxPlayers)
* * * * * * * * * * * * * * * * * * */
native GetPlayersInTeam( iTeam )
/* * * * * * * * * * * * * * * * * * *
* Sets number of players in a specified team.
*
* @param iTeam Which team
* @param iValue Value to set
*
* @return 1 on success, -1 on Invalid Team (1-MaxPlayers)
* * * * * * * * * * * * * * * * * * */
native SetPlayersInTeam( iTeam, iValue )
/* * * * * * * * * * * * * * * * * * *
* Returns number of Players in one Team
*
* @return Number of Players
* * * * * * * * * * * * * * * * * * */
native GetPlayerPerTeam( )
/* * * * * * * * * * * * * * * * * * *
* Sets number of Players in one Team
*
* @param iValue Number of players
* @return 1 on success, -1 on Invalid Number (1-MaxPlayers)
* * * * * * * * * * * * * * * * * * */
native SetPlayerPerTeam( iValue )
/* * * * * * * * * * * * * * * * * * *
* Searches for an available team.
*
* @return Team (0 if not found, 1-MAX_PLAYERS if found)
* * * * * * * * * * * * * * * * * * */
native FindAvailableTeam( )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when Player is assigned a team.
*
* @param id Player who got assigned a team.
* @param iTeam Team that he got assigned
* * * * * * * * * * * * * * * * * * * * * * * */
forward PlayerAssignTeam( id, iTeam )
• cs_battleroyale_roundmanager.inc
Code:
/* * * * * * * * * * * * * * * * * * * * * * *
* Returns whether the live game has started.
*
* @return Has game started or not.
* * * * * * * * * * * * * * * * * * * * * * * */
native HasGameStarted( )
/* * * * * * * * * * * * * * * * * * * * * * *
* Returns whether the specified team is the last one alive.
*
* @param iTeam Specified team.
*
* @return True on success, false otherwise.
* * * * * * * * * * * * * * * * * * * * * * * */
native IsLastTeam( iTeam )
/* * * * * * * * * * * * * * * * * * * * * * *
* Returns number of alive players in a specified team.
*
* @param iTeam Specified team.
*
* @return Number of alive players.
* * * * * * * * * * * * * * * * * * * * * * * */
native GetTeamAlivePlayers( iTeam )
/* * * * * * * * * * * * * * * * * * * * * * *
* Returns number of remaining teams (alive).
*
* @return Number of teams.
* * * * * * * * * * * * * * * * * * * * * * * */
native GetRemainingTeams( )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when Round Starts.
* * * * * * * * * * * * * * * * * * * * * * * */
forward RoundStarted( )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when Round Starts.
* * * * * * * * * * * * * * * * * * * * * * * */
forward RoundStarted( )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when Player opens airdrop.
*
* @param id Player who opens the airdrop.
* @param iEnt Airdrop entity index
* * * * * * * * * * * * * * * * * * * * * * * */
forward PlayerOpenAirDrop( id, iEnt )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when Player jumps from the airplane
*
* @param id Player who jumped.
* * * * * * * * * * * * * * * * * * * * * * * */
forward PlayerJumpPlane( id )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when Player is forced to jump from the airplane.
*
* @param id Player who jumped
* * * * * * * * * * * * * * * * * * * * * * * */
forward PlayerUrgentJump( id )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when Player deploys parachute.
*
* @param id Player who deployed the parachute.
* * * * * * * * * * * * * * * * * * * * * * * */
forward PlayerDeployParachute( id )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when Player opens backpack.
*
* @param id Player who opened backpack.
* * * * * * * * * * * * * * * * * * * * * * * */
forward PlayerOpenBackpack( id )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when Player uses a heal.
*
* @param id Player who used a heal.
* @param iType Heal type that he used.
* * * * * * * * * * * * * * * * * * * * * * * */
forward PlayerUseHeal( id, iType )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when Player picks-up a heal.
*
* @param id Player who picked up a heal.
* @param iType Type of heal he picked.
* * * * * * * * * * * * * * * * * * * * * * * */
forward PlayerPickUpHeal( id, iType )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when Red Zone appears.
* * * * * * * * * * * * * * * * * * * * * * * */
forward RedZoneAppear( )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when the last player of a team dies.
*
* @param id Last player of the team.
* @param iTeam Team of the player.
* * * * * * * * * * * * * * * * * * * * * * * */
forward TeamDead( id, iTeam )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when a player wins the round
*
* @param iTeam Team of the player
* * * * * * * * * * * * * * * * * * * * * * * */
forward RoundWinner( iTeam )
/* * * * * * * * * * * * * * * * * * * * * * *
* Forward called when round ends
*
* * * * * * * * * * * * * * * * * * * * * * * */
forward RoundEnded( )
• WHATS NEW? (Changelogs) *CHECK
Code:
* v1.0
• Initial Release
* v1.1
• Some fixes
* v1.2
• Deleted remove_entity_name("armoury_entity") from NewRound, should be in plugin_init
* v2.0 - Closed BETA:
• Instead of removing armoury_entity every round, moved to plugin_init()
• Fixed weapons not being spawned
• Completely re-wrote Round Manager, last version was glitchy.
• Starting from v2.0, you don't need CVAR Util, Infinite Round and No Objectives by VEN anymore. I implemented them in the mod
• Fixed fake teams, they would put in your team people who weren't even alive
• Added new method of fake teams, now instead of directly blocking spawn for player if he doesn't have a team, it checks if there's an available team for him.
• Added a bunch of new forwards
• Optimization
• Added new sound when taking zone damage
• Added new sound for airplane
• Added auto team join on connect
• I got tired of counting.
* v2.1
• Fixed the problem that was causing round to end because of the timer
• Fixed some parts that could bug
• Fixed bug that was colliding players when jumping
• Fixed bug that made players invisible
• Fixed bug that made player invicible
• Added a task to check if current alive players count is less than minimum, client_disconnect wasn't working properly
• Fixed bug that caused player who won the game to not re-spawn
• Fixed win manager, it was bugged before
• Fixed MOTD not appearing on people who die
• Added a code that blocks connect MOTD
* v2.2
• Fixed fake teams when doing duos/squads
• Removed the task I added in 2.1, added client_disconnect again but with a different method.
• Hopefully fixed the bug that made some players sometimes invisible and invicible. Will try to fix it if it occurs again.
* v2.3
• Added a code that might prevent players from remaining SOLID_NOT
• Added more commands for backpack
• Fixed damage stats
* v2.4
• Added new method of checking disconnect, now it works.
• Added new native SetPlayersInTeam (don't use it if you don't know what you're doing)
• Fixed ReLocatePlayer (was int should be float)
* v2.5
• The mod now supports every map! You only have to add spawnpoints/origins yourself.
• Made the mod 200% times more configurable, added a bunch of new .ini and .cfg files for easy access to the user.
• Added method to save player wins in Vault file.
• Removed money HUD
• Added option to choose whether to use automatic or custom spawn points
• Fixed some possible future bugs
• Optimized the code as always
• Fixed parachute velocity appearing if admin slayed player
• Fixed bug that was giving Victory Royale when players was killed by the zone
* v2.6
• AirDrop now creates weapons on the ground instead of giving them to the player, StripWeapons .inc isn't needed anymore.
• Added automatic way to create missing directory and files when playing on an unregistered map
• Constant Update of Friend HUD, now it will show the status of the teammates, Dead/Alive.
• VoiceChat limited to teammates - not tested
• Added DHUD showing newbies how to jump from the plane
• Added new camera angle, now it is similar to PUBG/Fortnite.
* v2.7
• Fixed teammate's names not showing in the HUD
• Fixed a flaw that let players [re]spawn at times when they weren't allowed to. (this hopefully fixes the bug that made a random person invincible).
* v2.8
• Fixed teammate's dead/alive status not showing correctly.
• Fixed camera showing center of the map because entity was out of map bounds (any velocity/origin axi above 4096.0 will show center of the map so make sure to lower the values when adding new origins).
• Had to return HAM_SUPERCEDE while blocking player spawn instead of just setting m_iNumRespawns to 1, because it was still letting players spawn.
• Credits
• HamletEagle - If it wasn't for him, this mod wouldn't have been completed. Huge props.
• EFFx - Airplane code.
• Ghosted - Player->Zone 2D calculation and a lot of other help.
• Natsheh - For his circle creation stock which I used for the red zone.
• KliPPy - Backpack code, I was lost in my old code.
• Arkshine - fix for WeaponList.
• Tutorial
Adding Custom Spawn Points for your weapons and healings:
Spoiler
Simply pick a spot where you want your weapon/healing to be spawned next time, say /sp and click 'Add Current Location'. And that's it, you now have one extra spawn point.
Adding Zone Starting Origins:
Spoiler
Simply pick a spot as described above, say /zo and click 'Add Current Location', and now you have one extra zone starting point.
Adding Plane Directions:
Spoiler
• Set sv_gravity to 0
• Jump to the sky
• Aim at the direction you want the plane to fly to
• Say /pd
• Click 'Add Direction'
• That's it, you now have added another plane direction.
• Add-Ons
• CsBattleRoyaleEntTracker.sma
- Keep track of your spawned entities, it will show the count of spawned weaponboxes and healing items. Say /track.
• CsBattleRoyaleWeaponModelsReplacer.sma
- In case you want to replace any weapon's model, then this add-on can do it for you.
[bp]
EMERGENCY_DROP = Drop de emergencia!
AIRDROP_ARRIVED = O airdrop aterrissou, va pegar!
TAKE_ITEM_MEDKIT = Voce recebeu %d de HP usando o kit Medico.
TAKE_ITEM_DRINK = Voce recebeu +%d de HP bebendo o Drink.
ADDED_ITEM_BACKPACK = %s foi adicionado a sua mochila.
CANT_TAKE_MEDKIT = Voce nao pode usar o kit medico quando sua HP e maior ou igual a %d.
CANT_TAKE_DRINK = Voce nao pode usar o Drink quando sua HP e maior ou igual a %d.
ROUND_WINNER = ~ Ganhador do Round, Time %d ~
YOUR_TEAM_PLACED = ~ Colocacao do seu time: #%d ~
ROUND_STARTS_IN = Atencao: O round comeca em %d segundo%s
ZONE_APPEARS = A zona vai aparecer em %d segundos.
ZONE_TIGHTEN = A zona comecou a fechar.
HUD_YOUR_TEAM = Seu time:
HUD_INFO = | ** Seu time: %d ** |^n| ** Times Restantes: %d ** |^n| ** Players vivos: %d ** |^n| ** Seus kills: %d ** |
I see you have remove_entity_name on weaponbox. This calls remove_entity, and creates a leak. It will destroy the box, without the weapons from the box, as I explained before.
call_think is the proper way.
[bp] EMERGENCY_DROP = Drop de emergencia! AIRDROP_ARRIVED = O airdrop aterrissou, va pegar! TAKE_ITEM_MEDKIT = Voce recebeu %d de HP usando o kit Medico. TAKE_ITEM_DRINK = Voce recebeu +%d de HP bebendo o Drink. ADDED_ITEM_BACKPACK = %s foi adicionado a sua mochila. CANT_TAKE_MEDKIT = Voce nao pode usar o kit medico quando sua HP e maior ou igual a %d. CANT_TAKE_DRINK = Voce nao pode usar o Drink quando sua HP e maior ou igual a %d. ROUND_WINNER = ~ Ganhador do Round, Time %d ~ YOUR_TEAM_PLACED = ~ Colocacao do seu time: #%d ~ ROUND_STARTS_IN = Atencao: O round comeca em %d segundo%s ZONE_APPEARS = A zona vai aparecer em %d segundos. ZONE_TIGHTEN = A zona comecou a fechar.
HUD_YOUR_TEAM = Seu time: HUD_INFO = | ** Seu time: %d ** |^n| ** Times Restantes: %d ** |^n| ** Players vivos: %d ** |^n| ** Seus kills: %d ** |
Thanks!
Quote:
Originally Posted by HamletEagle
I see you have remove_entity_name on weaponbox. This calls remove_entity, and creates a leak. It will destroy the box, without the weapons from the box, as I explained before.
call_think is the proper way.
Also please avoid declaring variables in a loop.
Done.
I should also delete remove_entity_name("armoury_entity") from NewRound/RoundEnd and put it in plugin_init, right?
[hu]
EMERGENCY_DROP = Elsősegély Csomag!
AIRDROP_ARRIVED = A Csomag megérkezett, menj és szerezd meg!
TAKE_ITEM_MEDKIT = %d HP-d van a MedKit használata után.
TAKE_ITEM_DRINK = Kaptál +%d HP-t az Italtól.
ADDED_ITEM_BACKPACK = %s belekerült a táskádba.
CANT_TAKE_MEDKIT = Nem használhatsz Medkitet ha több vagy egyenlő a HP-d mint %d.
CANT_TAKE_DRINK = Nem használhatsz Italt ha több vagy egyenlő a HP-d mint %d.
ROUND_WINNER = ~ A kör nyertese a %d csapat ~
YOUR_TEAM_PLACED = ~ A csapatod helyezése: #%d ~
ROUND_STARTS_IN = Figyelem: A kör kezdetét veszi %d másodpercen belül.
ZONE_APPEARS = A Zóna megjelenik %d másodpercen belül.
ZONE_TIGHTEN = A Zóna elkezdett szűkölni.
HUD_YOUR_TEAM = A Csapatod:
HUD_INFO = | ** A Csapatod: %d ** |^n| ** Hátralévő Csapatok: %d ** |^n| ** Élő Játékosok: %d ** |^n| ** Öléseid: %d ** |
Sounds cool, too bad I can't test it
(Orpheu is unreliable on ReHLDS/ReGameDLL - even if it works for some plugins I have tried.)
Sounds cool, too bad I can't test it
(Orpheu is unreliable on ReHLDS/ReGameDLL - even if it works for some plugins I have tried.)
Your translation has Unicode characters.
I was hoping not to use Orpheu and make it compatible for ReHLDS too but it was too much work, also I don't know how to use ReAPI functions.