MAB Posted August 16, 2015 Posted August 16, 2015 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
KariiiM Posted August 16, 2015 Posted August 16, 2015 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
MAB Posted August 16, 2015 Author Posted August 16, 2015 let me get this clear.. u r fixing the problem by changing the marker color? didn't work
KariiiM Posted August 16, 2015 Posted August 16, 2015 Your marker was without color/alpha,btw just tell me what's wrong with this code because i have no idea about your project
KariiiM Posted August 16, 2015 Posted August 16, 2015 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
MAB Posted August 16, 2015 Author Posted August 16, 2015 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now