SetPlayerFacingAngle
#1

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

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?
Reply
#3

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
Reply
#4

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.
Reply
#5

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

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

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)
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)