Machine Posted May 5, 2019 Share Posted May 5, 2019 so i am having problem with this code marker = createMarker(137.39999, 1850.4, 16.6, "cylinder", 1.5, 230, 251, 3, 153) function camera(player) if (source == marker and getElementType(player) == "player") then fadeCamera(player, true, 0.5) setCameraMatrix(player, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) end end addEventHandler("onMarkerHit", root, camera) it does work and show the camera but it doesnt give any fading effects i wanna fade in so screen becomes black for like 2 second then fade out so it show where set camera matrix is pointing Link to comment
Dimos7 Posted May 5, 2019 Share Posted May 5, 2019 marker = createMarker(137.39999, 1850.4, 16.6, "cylinder", 1.5, 230, 251, 3, 153) function camera(player) if (getElementType(player) == "player") then fadeCamera(player, true, 0.5) setCameraMatrix(player, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) end end addEventHandler("onMarkerHit", marker, camera) Link to comment
Moderators Patrick Posted May 5, 2019 Moderators Share Posted May 5, 2019 (edited) marker = createMarker(137.39999, 1850.4, 16.6, "cylinder", 1.5, 230, 251, 3, 153) function camera(hitElement) if getElementType(hitElement) == "player" then fadeCamera(hitElement, false, 0.5) setTimer(function() setCameraMatrix(hitElement, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) fadeCamera(hitElement, true, 0.5) end, 500, 1) end end addEventHandler("onMarkerHit", marker, camera) Edited May 5, 2019 by stPatrick Link to comment
Machine Posted May 5, 2019 Author Share Posted May 5, 2019 11 minutes ago, Dimos7 said: marker = createMarker(137.39999, 1850.4, 16.6, "cylinder", 1.5, 230, 251, 3, 153) function camera(player) if (getElementType(player) == "player") then fadeCamera(player, true, 0.5) setCameraMatrix(player, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) end end addEventHandler("onMarkerHit", marker, camera) didnt work still same thing even if you increase 0.5 6 minutes ago, stPatrick said: marker = createMarker(137.39999, 1850.4, 16.6, "cylinder", 1.5, 230, 251, 3, 153) function camera(hitElement) if getElementType(hitElement) == "player" then fadeCamera(hitElement, false, 0.5) setTimer(setCameraMatrix, 500, 1, hitElement, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) end end addEventHandler("onMarkerHit", marker, camera) also error https://imgur.com/D76s3Rm Link to comment
Moderators Patrick Posted May 5, 2019 Moderators Share Posted May 5, 2019 5 minutes ago, Machine said: didnt work still same thing even if you increase 0.5 also error https://imgur.com/D76s3Rm marker = createMarker(137.39999, 1850.4, 16.6, "cylinder", 1.5, 230, 251, 3, 153) function camera(hitElement) if getElementType(hitElement) == "player" then fadeCamera(hitElement, false, 0.5) setTimer(function() setCameraMatrix(hitElement, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) fadeCamera(hitElement, true, 0.5) end, 500, 1) end end addEventHandler("onMarkerHit", marker, camera) Link to comment
SaNoR Posted May 5, 2019 Share Posted May 5, 2019 It's sometimes happens when u copy code from forum, just write this line by yourself. 1 Link to comment
Machine Posted May 5, 2019 Author Share Posted May 5, 2019 34 minutes ago, SaNoR said: It's sometimes happens when u copy code from forum, just write this line by yourself. first of all i was using the wiki guide to learn not the forum second of all if your not gonna help in this section dont give a stupid opinion this section was made for programming help Link to comment
SaNoR Posted May 7, 2019 Share Posted May 7, 2019 On 05/05/2019 at 23:48, Machine said: first of all i was using the wiki guide to learn not the forum second of all if your not gonna help in this section dont give a stupid opinion this section was made for programming help Don't be toxic, retard. I was talking about https://imgur.com/D76s3Rm 1 Link to comment
LilDawage Posted May 9, 2019 Share Posted May 9, 2019 marker = createMarker(137.39999, 1850.4, 16.6, "cylinder", 1.5, 230, 251, 3, 153) function camera(hitElement) if getElementType(hitElement) == "player" then setCameraMatrix(hitElement, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) setTimer(function() fadeCamera(hitElement, true, 0.5) end, 500, 1) end end addEventHandler("onMarkerHit", marker, camera) Link to comment
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