SA-MP Forums Archive
SetPlayerFacingAngle - 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: SetPlayerFacingAngle (/showthread.php?tid=663513)



SetPlayerFacingAngle - TokicMajstor - 03.02.2019

Iam trying to make player looking in the specific side when he spawns I have used SetPlayerFacingAngle(playerid,angle) but nothing happens


Re: SetPlayerFacingAngle - Proxus - 03.02.2019

By 'nothing happens', do you mean it's just a blank screen (blue or black) or it faces a different way to what you want it to?


Re: SetPlayerFacingAngle - TokicMajstor - 03.02.2019

Quote:
Originally Posted by Proxus
Посмотреть сообщение
By 'nothing happens', do you mean it's just a blank screen (blue or black) or it faces a different way to what you want it to?
It happens the same thing like before I made that SetPlayerFacingAngle. Player is still facing like before


Re: SetPlayerFacingAngle - Proxus - 03.02.2019

Read about this on the wiki: https://sampwiki.blast.hk/wiki/SetPlayerFacingAngle
To debug the script, you could use GetPlayerFacingAngle(playerid, Angle); (https://sampwiki.blast.hk/wiki/GetPlayerFacingAngle) to find out what angle he is facing and if it has changed. There may be a slight error that has caused this and using that will possibly help out.


Re: SetPlayerFacingAngle - Type-R - 03.02.2019

You could also post a snipped of your code from OnPlayerSpawn, so we could assist you better


Re: SetPlayerFacingAngle - Pottus - 03.02.2019

Looks like someone is setting the facing able before setting the position of the player. Also you need to set the camera behind the player there is a function for that find it.


Re: SetPlayerFacingAngle - TokicMajstor - 04.02.2019

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Looks like someone is setting the facing able before setting the position of the player. Also you need to set the camera behind the player there is a function for that find it.
Ohhh yeah, Iam so stupid, i was setting it before the player position (SetPlayerPos)