marker = {}
marker[1] = createMarker(1217.0947265625, 357.6181640625, 19.413511276245, "corona", 3.5, 255, 255, 0, 255)
function TelePort(Element)
setElementPosition(Element, 1270.8095703125, 333.9189453125, 19.40625, true)
setElementFrozen(Element, true)
setTimer(setElementFrozen, 1000, 1,Element, false)
end
addEventHandler("onMarkerHit",marker[1], function (player)
if getElementType(player)=="player" then
local vehicle = getPedOccupiedVehicle(player)
if vehicle then
local pTeam = getPlayerTeam(player)
if pTeam and getTeamName(pTeam) == 'police' then TelePort(vehicle) return end
outputChatBox ('You are not in a team',player, 255, 0, 0 )
else
outputChatBox ('You do not have a Vehicle!',player, 255, 0, 0 )
end
end
end)
Try .. Server-only