Jump to content

not working


MAB

Recommended Posts

why it isn't working?!

local marker = createMarker(2441.18262,2065,11.82031,"arrow",1) -- creating a marker 
local blip = createBlipAttachedTo (marker,33,1) -- attaching a blip to the marker 
function enter (hit) 
if ( getElementType(hit) ~= "player" or isPedInVehicle(hit) ) then return end -- make sure that the hit element is a player and the player is on foot 
fadeCamera(hit,false,1,0,0,0) -- make his camera go black 
setTimer(fadeCameraDelayed,1500,1,hit) -- after 1.5 sec do the fadeCameraDelayed function 
end -- end of the function 
addEventHandler("onMarkerHit",marker,enter) -- attaching the enter function to the marker 
function fadeCameraDelayed(player) -- This function prevents debug warnings when the player disconnects while the timer is running 
    if (isElement(player)) then -- checking if the player didn't quit the game 
        fadeCamera(player, true, 0.5) -- return his camera to normal after 0.5 sec 
    end -- end of if 
end -- end of the function 

Link to comment
local marker = createMarker(2441.18262,2065,11.82031,"arrow",1,255,0,0,255,root) -- creating a marker 
local blip = createBlipAttachedTo (marker,33,1) -- attaching a blip to the marker 
function enter (hit) 
if ( getElementType(hit) ~= "player" or isPedInVehicle(hit) ) then return end -- make sure that the hit element is a player and the player is on foot 
fadeCamera(hit,false,1,0,0,0) -- make his camera go black 
setTimer(fadeCameraDelayed,1500,1,hit) -- after 1.5 sec do the fadeCameraDelayed function 
end -- end of the function 
addEventHandler("onMarkerHit",marker,enter) -- attaching the enter function to the marker 
function fadeCameraDelayed(player) -- This function prevents debug warnings when the player disconnects while the timer is running 
    if (isElement(player)) then -- checking if the player didn't quit the game 
        fadeCamera(player, true, 0.5) -- return his camera to normal after 0.5 sec 
    end -- end of if 
end -- end of the function 

Link to comment

Anyway,the code is safe of problems, just the marker is too small (tested)

local marker = createMarker(2441.18262,2065,11.82031,"arrow",2) -- creating a marker 
local blip = createBlipAttachedTo (marker,33,1) -- attaching a blip to the marker 
function enter (hit) 
if ( getElementType(hit) ~= "player" or isPedInVehicle(hit) ) then return end -- make sure that the hit element is a player and the player is on foot 
fadeCamera(hit,false,1,0,0,0) -- make his camera go black 
setTimer(fadeCameraDelayed,1500,1,hit) -- after 1.5 sec do the fadeCameraDelayed function 
end -- end of the function 
addEventHandler("onMarkerHit",marker,enter) -- attaching the enter function to the marker 
function fadeCameraDelayed(player) -- This function prevents debug warnings when the player disconnects while the timer is running 
    if (isElement(player)) then -- checking if the player didn't quit the game 
        fadeCamera(player, true, 0.5) -- return his camera to normal after 0.5 sec 
    end -- end of if 
end -- end of the function 

Link to comment
Anyway,the code is safe of problems, just the marker is too small (tested)
local marker = createMarker(2441.18262,2065,11.82031,"arrow",2) -- creating a marker 
local blip = createBlipAttachedTo (marker,33,1) -- attaching a blip to the marker 
function enter (hit) 
if ( getElementType(hit) ~= "player" or isPedInVehicle(hit) ) then return end -- make sure that the hit element is a player and the player is on foot 
fadeCamera(hit,false,1,0,0,0) -- make his camera go black 
setTimer(fadeCameraDelayed,1500,1,hit) -- after 1.5 sec do the fadeCameraDelayed function 
end -- end of the function 
addEventHandler("onMarkerHit",marker,enter) -- attaching the enter function to the marker 
function fadeCameraDelayed(player) -- This function prevents debug warnings when the player disconnects while the timer is running 
    if (isElement(player)) then -- checking if the player didn't quit the game 
        fadeCamera(player, true, 0.5) -- return his camera to normal after 0.5 sec 
    end -- end of if 
end -- end of the function 

so the problem was the marker size? LOL

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...