ehh k now i have one last problem before this is finished
i want the player to be warped to the vehicle who created the marker when the player hit a ccolshape the colshape is there since when i enter it it says bad argument at setelementposition
colshape = createColRectangle (313.0009765625, 1033.708984375, 100, 100)
colshapeinterior = setElementInterior(colshape, 9)
function createAndroMarker(thePlayer)
x,y,z = getElementPosition( vehicle )
vehicle = getPedOccupiedVehicle(thePlayer)
theMarker = createMarker ( x - 25, y + 5, z, "cylinder", 20.5, 0, 0, 255, 170 )
setTimer ( removeMarker, 4000, 1 )
addEventHandler( "onMarkerHit", theMarker, warpPlayerIntoAndro )
end
addCommandHandler("marker", createAndroMarker)
function warpPlayerIntoAndro(hitElement, dimensionMatch)
outputDebugString("Warp function triggered")
if getElementType(hitElement) ~= "player" then return end
if isPedInVehicle(hitElement) then removePedFromVehicle(hitElement) end
setElementInterior(hitElement, 9, 315.48, 984.13, 1959.11 )
end
function removeMarker()
destroyElement ( theMarker )
end
function warpPlayerOut()
setElementPosition(hitElement, x, y, z)
end
addEventHandler ( "onColShapeHit", colshape, warpPlayerOut )