PlayerFacingAngle? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: PlayerFacingAngle? (
/showthread.php?tid=465244)
PlayerFacingAngle? -
CesarLT - 21.09.2013
Hello everyone, I am having trouble with my spawn point.
I've mapped it and made everything fine, but when I enter the game, my character looks to the right. (Even tho I /saved it right.)
This is how it looks like.
How can I make the player face the camera itself?
This is the code:
pawn Код:
SetPlayerPos(playerid, -674.9565,2043.4287,78.4994);
SetPlayerCameraPos(playerid, -675.2801,2041.1069,78.4994);
SetPlayerCameraLookAt(playerid, -674.9565,2043.4287,78.4994);
Thanks in advance.
Re: PlayerFacingAngle? -
Konstantinos - 21.09.2013
You have set only X, Y, Z for the class selection. Open the savedpositions.txt and goto the line you saved before. Copy the parameter for the angle and do:
pawn Код:
SetPlayerFacingAngle(playerid, angle_here);
Re: PlayerFacingAngle? -
Dragonsaurus - 21.09.2013
Go to your saved position (The one you did with /save) and copy the 5th number.
Under SetPlayerPos write:
pawn Код:
SetPlayerFacingAngle(playerid, number); // Replace the "number" with the number copied from the saved position
Edit: Known reason.
Re: PlayerFacingAngle? -
CesarLT - 21.09.2013
Quote:
Originally Posted by Konstantinos
You have set only X, Y, Z for the class selection. Open the savedpositions.txt and goto the line you saved before. Copy the parameter for the angle and do:
pawn Код:
SetPlayerFacingAngle(playerid, angle_here);
|
Thanks...again lol.
Quote:
Originally Posted by Dragonsaurus
Go to your saved position (The one you did with /save) and copy the 5th number.
Under SetPlayerPos write:
pawn Код:
SetPlayerFacingAngle(playerid, number); // Replace the "number" with the number copied from the saved position
Edit: Known reason.
|
Thank you!