Hiányol egy ilyet ) de küld el a mostani kódod, és jelöld a tízes sort.
local Marker = createMarker(2476.72925, -1670.19153, 12.3,\"cylinder\",1.4,73, 150, 122,160)
local defaultGate = createObject( 968, 2473.53613, -1669.20337, 13.32032, 90, 0, 0 )
addEvent( \"openGate\", true )
addEventHandler( \"openGate\", root, function(thePlayer)
moveObject(defaultGate, 2000, 2473.53613, -1669.20337, 13.32032, -90, 0, 0)
setTimer(function()
moveObject(defaultGate, 2000, 2473.53613, -1669.20337, 13.32032, 90, 0, 0)
Ez a 10-ES SOR: end, 3000, 1)
local money = getPlayerMoney(thePlayer)
setPlayerMoney(thePlayer, money-10)
end)
addEventHandler(\'onMarkerHit\', root, function(hitElement, hitDimension)
if getElementType(hitElement) ~= \'player\' then return end
local vehicle = getPedOccupiedVehicle(hitElement)
if vehicle then
if source == Marker then
triggerClientEvent(hitElement, \"inTheMarker\", hitElement, \"Hit\")
end
end
end)
addEventHandler(\'onMarkerLeave\', root, function(hitElement, hitDimension)
if getElementType(hitElement) ~= \'player\' then return end
local vehicle = getPedOccupiedVehicle(hitElement)
if vehicle then
if source == Marker then
triggerClientEvent(hitElement, \"inTheMarker\", hitElement, \"Leave\")
end
end
end)