The angles are weird -
saffierr - 15.09.2015
Somehow all of my teleports are not the way I want it.
The facing Angle are not the way I want them to face.
It's always a random Angle they're facing at.
Help would be really appreciated
one of my tps :
PHP код:
CMD:drivingschool(playerid, params[])
{
new Float:Angle;
GetPlayerFacingAngle(playerid, Angle);
SetPlayerFacingAngle(playerid, 180);
SetPlayerPos(playerid, -2026.2877,-78.2901,35.3203);
SendClientMessage(playerid, COLOR_YELLOW, "You are teleported to the drivingschool!");
return 1;
}
Re: The angles are weird -
khRamin78 - 15.09.2015
PHP код:
CMD:drivingschool(playerid, params[])
{
new Float:Angle;
GetPlayerFacingAngle(playerid, Angle); // Why You Are Getting This ? where you use it ?
SetPlayerFacingAngle(playerid, 180); // 180 ? FacingAngle Is Float 180.0 but just use /save and get your facing angle from there so it will be where you want
SetPlayerPos(playerid, -2026.2877,-78.2901,35.3203);
// Note : Put SetPlayerFacing Angle After SetPlayerPos
SendClientMessage(playerid, COLOR_YELLOW, "You are teleported to the drivingschool!");
return 1;
}
Please Answer my Up Question's Also
** Put SetPlayerFacingAngle After SetPlayerPos **
Re: The angles are weird -
karemmahmed22 - 15.09.2015
PHP код:
new Float:Angle;
SetPlayerPos(playerid, -2026.2877,-78.2901,35.3203);
GetPlayerFacingAngle(playerid, Angle);
SetPlayerFacingAngle(playerid, Angle + 180);
Re: The angles are weird -
saffierr - 15.09.2015
Aaight, thanks, I did 180 because I tried everything lol so I just left it on 180 since nothing solved my problem.
PHP код:
CMD:drivingschool(playerid, params[])
{
SetPlayerPos(playerid, -2026.2877,-78.2901,35.3203);
SetPlayerFacingAngle(playerid, 181.8009);
SendClientMessage(playerid, COLOR_YELLOW, "You are teleported to the drivingschool!");
return 1;
}
Doesn't work also
Re: The angles are weird -
Sjn - 15.09.2015
Use /save to get the coordinate of the player you want to teleport to. It gives the facing angle coordinate as well. Also, i know there's another problem with SetPlayerPos, like the camera of the player doesn't stay at the same position, so i'd recommend you to use SetCameraBehindPlayer(playerid); function right after setting the player's position.
Re: The angles are weird -
saffierr - 15.09.2015
Solved my problem thank you Sjn.