Jump to content

createPed & setCameraTarget...


Recommended Posts

So i have come across a problem on the client side with:

fakeCar = createVehicle(vehModel, 0, 0, 0) 
fakePed = createPed(263, 0, 0, 0, 0, false) or outputChatBox('False') 
warpPedIntoVehicle(fakePed, fakeCar) 
setCameraTarget(fakePed) 

setCameraTarget says that there is an expected number at argument one, well I assume this is bugging with the other client side option. fakePed variable also isn't working in an other function, it isn't local so it should work. So it creates the ped and the vehicle and puts the ped in the car, but I can't watch the ped, and I also cannot use: setPedControlState(fakePed, 'accelerate', vehAccelerate) in the other function.

I am almost done with this code, and before you ask vehAccelerate is defined and is correct.

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

Players

That's probably why it shows you the warning message. Remember, ALL players are peds but NOT ALL peds are players. You should use the other variant of the function and if it needs to follow the ped then you'll need to use onClientPreRender.

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