IloveMTA Posted March 16, 2011 Share Posted March 16, 2011 Hello all, It is said that I have to use timer with this to correctly place the camera at ped's back. But I use only this command with noting else, and it works fine by placing the camera back. Can someone tell why is it so? This bug fixed? Thanks. Link to comment
Moderators Citizen Posted March 16, 2011 Moderators Share Posted March 16, 2011 show us ur code too It's not necessary because he wanted to know why his code works because in the wiki it says that: By default setCameraTarget will look at the player front, but if you want it to look from the back then you have to call the setCameraTarget twice, like this: ... setCameraTarget(source) setTimer(setCameraTarget, 100, 1, source) ... Q: Why it's in a timer? A: You have to put the second call in a timer, because the server will skip the second call if you won't delay it (he thinks that it's not necessary). I don't know why and who said that but I think it's a noob: I use this: setCameraTarget( source, source ) It set the camera target of source at source ( so his camera on him ) Link to comment
IloveMTA Posted March 16, 2011 Author Share Posted March 16, 2011 Citizen thank you very much but it confused me more acutally. CowTurbe code is like: setCameraTarget(playerSource, getPlayerFromName("Blabla")) When I use that to spec someone, I get the result I want (Sa-mp SetCameraBehindPlayer equiv., default camera from behind) It works fine. But what about timers? And when we need to use them? I want to make sure that I am not missing anything. Thanks again. Link to comment
Castillo Posted March 16, 2011 Share Posted March 16, 2011 I don't get what do you want to do, could you explain it a bit better? Link to comment
IloveMTA Posted March 16, 2011 Author Share Posted March 16, 2011 Thanks solidsnake14, I want to spec someone. setCameraTarget(playerSource, getPlayerFromName("Example")) This works fine and I can spec the target person. However: 1. MTA wiki states that, setCameraTarget function places the camera "facing" the player, not from behind. And it says you should call this one more time with a timer to place it "behind" the player. 2. When I try this to spec someone, it places directly behind player without any timer or a second call of this func. I need clearification on this. If this function works correctly, why is a timer or a second call needed? (for placing behind)Thank you Link to comment
Castillo Posted March 16, 2011 Share Posted March 16, 2011 Hmmm, if you use this function once, when that player moves the camera stills following the target? if so, it doesn't need any timer i think. Link to comment
IloveMTA Posted March 16, 2011 Author Share Posted March 16, 2011 (edited) Yes Snake, it follows. It should be removed from Wiki. Wiki is clearly wrong. I just switched from sa-mp but I am dissapointed because of many wiki mistakes. I hope they will get corrected soon. Edited March 16, 2011 by Guest Link to comment
Moderators Citizen Posted March 16, 2011 Moderators Share Posted March 16, 2011 Yeah the guy who write that on the wiki is a noob ( and there are a bad syntax for the server-side ) Don't worry about this timer you don't need that 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