ship = createMarker( 2102.4775390625, -2956.5537109375, 16.2890625, "cylinder", 2, 0, 255, 0, 200 )
local vehicles = {}
function spawnVeh4(id)
local x, y, z = getElementPosition(source)
local rx, ry, rz = getElementRotation(source)
if isElement(vehicles[source]) then destroyElement(vehicles[source]) end
vehicles[source] = createVehicle(id, 2112.7265625,-2939.427734375,18,0,0,90)
setVehicleColor(vehicles[source], 0, 255, 0)
end
addEvent("CreVehice3",true)
addEventHandler("CreVehice3", root, spawnVeh4)
addEventHandler("onPlayerQuit", root,
function ()
if isElement(vehicles[source]) then
destroyElement(vehicles[source])
vehicles[source] = nil
end
end)
function showGUI3(hitPlayer)
local name = getTeamName(getPlayerTeam(hitPlayer))
if (not isPedInVehicle(hitPlayer)) then
if ( name == "Military" ) or ( name == "Staff" ) then
triggerClientEvent (hitPlayer,"showGUI3",getRootElement(),hitPlayer)
end
end
end
addEventHandler("onMarkerHit",ship,showGUI3)