Scripting player position problem. Please help ASAP.
#1

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 2504.8933,-1683.5768,13.5469,46.3701);
SetPlayerCameraPos(playerid, 2503.1555,-1681.8048,13.5469);
SetPlayerCameraLookAt(playerid, 2504.8933,-1683.5768,13.5469);
return 1;
}

I got everything i need on it. On SetPlayerPos I usually only use the X,Y,Z code the first 3 but The characters position is facing away from the camera. (Back turned tword the camera) Which i want the character facing the camera for skin selection. I added the 4th code thinking maybe it was the players head or camera direction i was in as i typed /save I.G.....Im new to scripting so please keep it basic Im not sure what the problem is here what im doing wrong.

Main point: The character in skin selection is facing away from the camera and I want it facing twords the camera for skin selection. Dont know how to change the players angle. etc.

Please help thanks
Reply
#2

I get views but no replys please someone help!
Reply
#3

Try this -> https://sampwiki.blast.hk/wiki/SetPlayerFacingAngle

And this topic should be in Scripting Discussion - http://forum.sa-mp.com/forumdisplay.php?f=12
Reply
#4

Thanks and oh sorry i apologize kind of new to these forums....and thanks but where will a place.....

SetPlayerFacingAngle( playerid, 0 )

On the script? After the...

SetPlayerPos(playerid, 2504.8933,-1683.5768,13.5469,46.3701);

Or where?
Reply
#5

Yes, after SetPlayerPos, but you should try different values (0-360) for the angle parameter to find the right one. For example:

pawn Код:
SetPlayerFacingAngle(playerid, 0);
or
pawn Код:
SetPlayerFacingAngle(playerid, 90);
or
pawn Код:
SetPlayerFacingAngle(playerid, 180);
etc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)