Jump to content

Question


manve1

Recommended Posts

Posted

Is there a problem with setCameraTarget?

Because i tried it and it didn't set my camera to a vehicle which was created via server side

(( if u think i done something wrong, please post suggestion about how the script should look for the camera to be attached to a vehicle that was created via server side ))

Posted
This function allows you to set a player's camera to follow other elements instead. Currently supported element type is:

- Players

Posted

Bad argument @ setCameraMatrix

local x, y, z = getElementPosition( source ) 
veh = createVehicle( 519, x + 15, y, z, 0, 0, 180 ) 
  
setTimer( 
function() 
if isElement(veh) then 
local xVeh, yVeh, zVeh = getElementPosition( veh ) 
setCameraMatrix( source, xVeh, yVeh, zVeh ) 
end 
end, 50, 0 
) 

Posted

source should be standing for getRootElement(), but as i remember it gets every single element, so how could i change it?

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...