local marker = createMarker(2492.23315 ,-1671.33667 ,13.33595,'cylinder',2,0,255,0,255)
function shot( )
local vehicle = getPedOccupiedVehicle ( localPlayer )
if ( vehicle ) then
if ( CanShoot == true ) then
local x, y, z = getElementPosition ( vehicle )
createProjectile ( vehicle, 19, x, y, z, 200 )
CanShoot = false
unbindKey ( "mouse1", "down",shot)
end
end
end
addEventHandler("onClientMarkerHit" , getRootElement(),
function ()
if ( source == "marker" ) then
bindKey ( "mouse1", "down",shot)
CanShoot = true
end
end)