In wiki they dosn't explaining everything good. Example look this: https://wiki.multitheftauto.com/wiki/Writing_Gamemodes
I dont understand anything what they speak about that line code:
<map>
<spawnpoint id="spawnpoint1" posX="1959.5487060547" posY="-1714.4613037109" posZ="877.25219726563" rot="63.350006103516" model="0"/>
<pickup id="Armor 1" posX="1911.083984375" posY="-1658.8798828125" posZ="885.40216064453" type="armor" health="50" respawn="60000"/>
<flag posX="1959.5487060547" posY="-1714.4613037109" posZ="877.25219726563" team="blue" />
...
</map>
Where sould it even take place? Does i need to make some.map file? If i have then how i register it, so server knows that i want to use it? Does i have to add code into meta.xml?
After that where will that code goes:
-- retrieve a table with all flag elements
local flagElements = getElementsByType ( "flag" )
-- loop through them
for key, value in pairs(flagElements) do
-- get our info
local posX = getElementData ( value, "posX" )
local posY = getElementData ( value, "posY" )
local posZ = getElementData ( value, "posZ" )
local team = getElementData ( value, "team" )
-- create an object according to the flag position
createObject ( 1337, posX, posY, posZ )
-- output the team that we created a base for
outputChatBox ( "Base for team " .. team .. " created" )
end
is .map files only for making objects in game or what? if i wanna make pickups, add cars sould i use .map files then?