GGeri Posted September 29, 2020 Posted September 29, 2020 how can i leave from the camera? This is the script: local cam1 = createObject ( 1886,1592.1999511719,-1370.0999755859,34.299999237061, 10, 0, 0 ) function gotoCam1( ) local v = getPedOccupiedVehicle(localPlayer) if v and getElementModel(v) == 596 then --596 is Police LS, 597 SF and 598 LV setCameraMatrix ( 1592.1999511719,-1370.0999755859,34.299999237061, 1593.0999755859, -1397.3000488281, 27.799999237061,0,100 ) outputChatBox("Camera 01", 0, 255, 0) else outputChatBox ( 'You are not in a police car.', 255, 0, 0 ) return end end addCommandHandler ( 'cctv1', gotoCam1 )
Moderators Patrick Posted September 29, 2020 Moderators Posted September 29, 2020 Change back camera's target to localPlayer, with setCameraTarget. 1 1 community profile | map converters | map images | pDownloader | pAttach | model encrypter
KronoS Lettify Posted September 29, 2020 Posted September 29, 2020 For you set the camera target to yourself, try using setCameraTarger function. 2 Página Facebook: The News Joker (The Piadas & News) Discord: @kronos.lettify em Discord oficial do MTA Dê um THANKS se minha ajuda ou comentário foi útil para você.
GGeri Posted September 29, 2020 Author Posted September 29, 2020 and exactly how do i paste it because i tried but it doesn't work could you help?
KronoS Lettify Posted September 29, 2020 Posted September 29, 2020 4 minutes ago, GGeri said: and exactly how do i paste it because i tried but it doesn't work could you help? Show me the code you used to test 1 1 Página Facebook: The News Joker (The Piadas & News) Discord: @kronos.lettify em Discord oficial do MTA Dê um THANKS se minha ajuda ou comentário foi útil para você.
GGeri Posted September 29, 2020 Author Posted September 29, 2020 local cam1 = createObject ( -1675.083984375, 35.552238464355, 9.9354476928711, 10, 0, 0 ) function gotoCam1( ) local v = getPedOccupiedVehicle(localPlayer) if v and getElementModel(v) == 596 then --596 is Police LS, 597 SF and 598 LV setCameraMatrix ( -1675.083984375, 35.552238464355, 9.9354476928711,-180,90,10 ) outputChatBox("Kamera 01", 0, 255, 0) else outputChatBox ( '[BlackLife] Nem vagy rendőrautóban.', 255, 0, 0 ) return end end addCommandHandler ( 'cctv1', gotoCam1 ) function leave ( ) local bool setCameraTarget ( player thePlayer [, player target = localPlayer ] ) end end addCommandHandler ( 'leave' leave)
KronoS Lettify Posted September 29, 2020 Posted September 29, 2020 1 minute ago, GGeri said: function leave ( ) local bool setCameraTarget ( player thePlayer [, player target = localPlayer ] ) end end addCommandHandler ( 'leave' leave) This is wrong. Try: addCommandHandler('leave', function (player) setCameraTarget(player) end ) 2 Página Facebook: The News Joker (The Piadas & News) Discord: @kronos.lettify em Discord oficial do MTA Dê um THANKS se minha ajuda ou comentário foi útil para você.
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