Let's start.
First create "meta.xml" file here (You can create your file name "My server and create all scripts there : Local Disk:C/Program Files/MTA/Server/Mods/Resourse
Second you need get ID of car/motorcycle anything you want.
Third , we will create marker
marker = createMarker(114,-1675,20,"corona",2,0,255,0)
Now, we add a handled function that will happen when player (source) hits the marker:
addEventHandler("onClientMarkerHit",marker,
function()
local vh = getPedOccupiedVehicle ( source )
vehicles = { --[[ID here (Ex: 1, 2, 3)]] }
nm = tonumber ( math.random( #vehicles ) )
setElementModel ( vh, nm )
end)
Now , merge that two codes.
marker = createMarker(x, y, z,"corona",2,0,255,0)
addEventHandler("onClientMarkerHit",marker,
function()
local vh = getPedOccupiedVehicle ( source )
vehicles = { --[[YOUR ID'S HERE, SEPARATED BY A COMA (Ex: 1, 2, 3)]] }
nm = tonumber ( math.random( #vehicles ) )
setElementModel ( vh, nm )
end)
Save that code as "client.lua" into the map folder.
Open the file meta.xml located inside the map folder.
Add at the beginning below <meta> this code:
<script src="client.lua" type="client" />
Finaly we finished,save meta.xml
If you have some problems PM me.BTW My new skype is nemanja.stanojevic58