30.03.2010, 17:19
Hi, I'm try to create a very easy RequestClass by using goniometric numbers.. Sometimes it works but not now..
What I'm saying is I try to create this (not the black boxes): >>
(this picture is with a lot of coords, you know a request class)
But not in a lot different coords but only one coord and that's the coord of the player.
This is my code.. Like I said, it works only sometimes correct but not now? Can anyone see something wrong?
(For more info Crd[0] = X, Crd[1] = Y, Crd[2] = Z; Crd[3] = Angle)
I just try to take the coords in front of the player..
Anyone knows?
What I'm saying is I try to create this (not the black boxes): >>
(this picture is with a lot of coords, you know a request class)
But not in a lot different coords but only one coord and that's the coord of the player.
This is my code.. Like I said, it works only sometimes correct but not now? Can anyone see something wrong?
Код:
new Float: Crd[4] ; Crd[0] = 12.7373, Crd[1] = 296.2621, Crd[2] = 1200.1439, Crd[3] = 240.1869; SetPlayerPos(playerid, Crd[0], Crd[1], Crd[2]); SetPlayerFacingAngle(playerid, Crd[3]); SetPlayerCameraPos(playerid, Crd[0] + (25 * floatsin(-Crd[3], degrees)), Crd[1] + (25 * floatcos(-Crd[3], degrees)), Crd[2]); SetPlayerCameraLookAt(playerid, Crd[0] + (25 * floatsin(-Crd[3], degrees)), Crd[1] + (25 * floatcos(-Crd[3], degrees)), Crd[2]);
I just try to take the coords in front of the player..
Anyone knows?