This tutorial will show you how to create your very own map to run on the Red vs Blue game mode ran by SAES @ mtasa://51.38.67.64:7000 (mta.saesrpg.net:7000)

We now have an alternative gaming option for RvB, called RvB_Ambush so you may be interested in creating an ambush map instead of a normal red vs blue map (CLICK HERE FOR AMBUSH TUTORIAL)

When making maps, create a folder with the prefix rvb_ so if you map was verona beach, the folder would be called rvb_verona, then inside the folder create two new files, one called meta.xml and the other called ''yourmapname''.map (change 'yourmapname' obviously), you don't need to name it after the place, but that's just an example.

Anyways down to business, the meta.xml..

Change only the author, description and version, as the rest is required for the map to work correctly with mapmanager

<meta>
   <info type="map" gamemodes="rvb" author="Your Name" description="Your description"  version="1"/>
   <map src="yourmapname.map"/>
</meta>

The author, description (area) and version will be displayed on map start, so people know if you created the map 😛

The image shows the following as defined in the rvb_usethetrees resource meta.xml:

  • Author: BrophY

  • Description: Isolation: Use the Trees

  • Version: 1

The example below is how the meta.xml looks for rvb_usethetrees:

<meta>
   <info type="map" gamemodes="rvb" author="BrophY" description="Isolation: Use the Trees"  version="1"/>
   <map src="rvb_usethetrees.map"/>
</meta>

Then at the very top of your .map file, place our current RvB map syntax (this is an example)

<map>
	<Options timeH="8" timeM="0" weather="1" armour="true" interior="0" friendlyfire="true" show_radar="true" show_blips="true"/>
	<Attack posX="-162.820" posY="2284.5400" posZ="30.4754" skin="111,112,113,125" rot="168.8051" weapons="27,50;31,1000;16,4;4,1" weapon_stats="71,1000,72,1000" message="Rules: NO CAMPING" />
	<Defend posX="210.9222" posY="1865.9434" posZ="13.15" skin="164,165,287" rot="0" weapons="27,50;31,1000;16,4;4,1" weapon_stats="71,1000,72,1000" message="Rules: NO LEAVING BASE" />
  
  
	<object id="object (submarr_sfe) (1)" breakable="true" interior="0" collisions="true" alpha="255" model="9958" doublesided="false" scale="1" dimension="0" posX="1320.9285" posY="-975.89069" posZ="102.5052" rotX="270" rotY="0" rotZ="0"></object>
  	<object id="object (submarr_sfe) (2)" breakable="true" interior="0" collisions="true" alpha="255" model="9958" doublesided="false" scale="1" dimension="0" posX="1312.3917" posY="-981.26819" posZ="102.5052" rotX="270" rotY="0" rotZ="0"></object>
  	<object id="object (CJ_SANDBAG) (1)" breakable="true" interior="0" collisions="true" alpha="255" model="2060" doublesided="false" scale="1" dimension="0" posX="1300.3853" posY="-976.07538" posZ="147.8004" rotX="0" rotY="0" rotZ="29.257"></object>
  	<object id="object (CJ_SANDBAG) (2)" breakable="true" interior="0" collisions="true" alpha="255" model="2060" doublesided="false" scale="1" dimension="0" posX="1299.3059" posY="-976.46887" posZ="147.8004" rotX="0" rotY="0" rotZ="7.314"></object>
</map>

KEY:

  • posX = Player's position on the X axis

  • posY = Player's position on the Y axis

  • posZ = Player's position on the Z axis

  • rot = Player's Rotation

  • timeH = Game Time Hour

  • timeM = Game Time Minute

  • weather = Game Weather

  • armour = if this is set to "true" then players will spawn with armour

  • interior = sets player's interior, so interiors can be used in maps

  • friendlyfire = sets team friendly fire

  • show_radar = sets if you want the radar to be displayed, this will not interfere with blips

  • show_blips = sets if you want blips to be displayed on radar / f11 map

  • weapons = weapons id and ammo are split by a comma ( , ) and weapons are split by a semi-colon ( ; )

Example: 27,50;31,1000 would give you the weapon id 27 with 50 ammo and weapon id 31 with 1000 ammo, it's up to you how many weapons you would like to set. If you are setting weapons such as a baseball bat or night vision, set its ammo to 1.

  • weapon_stats = weapon stats id and the value are split by a comma ( , ) and stats are split by a semi-colon ( ; )

Example: 71,1000;72,1000 would set the following to maximum and allow you to walk while aiming:

72: WEAPONTYPE_SHOTGUN_SKILL
73: WEAPONTYPE_SAWNOFF_SHOTGUN_SKILL

For more information about weapon stats, see: http://wiki.multitheftauto.com/wiki/SetPedStat

If you do not wish to mess with them, then keep it blank and it will default all weapon stats to 1000.

attack and defend elements are self-explanatory, these are the coordinates of the teams that will spawn (x,y,z), along with their rotation on spawn, skin id's are split with a comma ( , ), it's up to you what skins you would like your team to use

  • message = displays whatever is set to the attacking/defending team on round start, so you can use it to state map rules or to encourage players

You may also add vehicles, objects and markers (and anything else the map supports) to the .map if you know how to do it, this is an example of the vehicle xml syntax, just add them after the attack and defend elements but before the </map>

<vehicle model="497" posX="1200" posY="-500" posZ="25" rotX="0" rotY="0" rotZ="470"/>

We now support the use of other .lua files within map resources, say for example you want a team to win by reaching a checkpoint, well now its possible, just define your script in your meta.xml, I won't put an example of it, because if you know how to code then you will know how to add a script to your metafile

We have the follow exported commands:

triggerRoundEnd ( teamName or "attacking"/"defending" ) - Use this to trigger a round end, say for example a team reach a checkpoint and you want the round to end, you can check there teamName and send the teamName string to triggerRoundEnd by doing this:

exports.RvB:triggerRoundEnd ( teamName )

Whatever team name that is passed to triggerRoundEnd, that team will win the round.

Or if you want the "attacking" team to win or the "defending" team to win, for example:

exports.RvB:triggerRoundEnd ( "attacking" )

We also have a GUI Message Box at your disposal, if you want detailed information to be displayed, you can call this both client and serverside and you must decide when you want this to be displayed, I suggest you look at THIS for events on triggering with mapmanager

Serverside:

exports.RvB:displayMessage ( source,message )

Serverside: source being the player, the message being the string you want to pass to the GUI box
Clientside: message being the string you want to pass to the GUI box

Clientside:

exports.RvB:displayMessage ( message )

There is also a dedicated function to return the attacking team:

exports.RvB:getAttackingTeam ()

This will return either "red" or "blue" depending on which team is attacking

You can get the majority of this information as a table, the following function that will return a table of RvB information

exports.RvB:rvbInfoTable ()

and the following information is returned in the table:

  • .attackingmessage = Message displayed to the attacking team (string)

  • .defendingmessage = Message displayed to the defending team (string)

  • .mapname = Name of current map running (string)

  • .redscore = Score of the Red Team (integer)

  • .bluescore = Score of the Blue Team (integer)

  • .weather = Current Weather Setting (id)

  • .armour = will return either "true" or "false" if armour has been enabled/disabled on the map (string)

  • .interior = will return interior (id)

  • .ff = will return either "true" or "false" if friendlyfire has been enabled/disabled on the map (string)

  • .radar = will return either "true" or "false" if radar has been enabled/disabled on the map (string)

  • .blips = will return either "true" or "false" if blips has been enabled/disabled on the map (string)

  • .attack = will return either "blue" or "red" depending on which team is attacking (string)

Example of Use:

rvbtable = exports.RvB:rvbInfoTable ()

redTeamScore = tostring(rvbtable.redscore) -- converts the redscore variable from integer to string, so it can be outputted correctly in chatbox below

outputChatBox ( redTeamScore ) -- output the score to chatbox

Please create fun maps, where defending teams have a good place to defend and make sure teams are not miles apart 😉

When you have created them, put them in a zip or rar and upload them to the RvB tracker.

Have Fun