OnPlayerRequestClass... -
Hudgens - 05.03.2012
This is a really nooby question, but I haven't scripted in ages lmfao.
I'm just messing around and I can not come up with a way to make my character FACE the stupid camera.
Here's the coordinates:
Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1544.2389,-1360.1006,329.4627);
SetPlayerCameraPos(playerid, 1544.2495,-1354.9449,329.4715);
SetPlayerCameraLookAt(playerid, 1544.2389,-1360.1006,329.4627);
return 1;
}
Re: OnPlayerRequestClass... -
coole210 - 05.03.2012
Save the position of you looking at the place where you want to see the face (/save) and use the coords in SetPlayerCameraPos.
Re: OnPlayerRequestClass... -
Hudgens - 05.03.2012
Doesn't that just change where I see the character, and not where the character stands? ..
Re: OnPlayerRequestClass... -
Twisted_Insane - 05.03.2012
That was
exactly the same thing I had when I wanted to do that! But it's pretty easy, look!
Save the first position where your skin should stand / appear! "/save skin1_stand"
Then, place CJ at the place you would like to see the skin from, imagine the place where CJ stands as the camera which is filming at the position he likes! "/save skin1_camera"!
Then, it should look like 'dis:
pawn Код:
SetPlayerPos(playerid, X-Y-Z from first savepoint);
SetPlayerFacingAngle(playerid, ANGLE (4th co-ord) from first savepoint);
SetPlayerCameraPos(playerid, X-Y-Z from second savepoint);
SetPlayerCameraLookAt(playerid, here again X-Y-Z from first savepoint);
Re: OnPlayerRequestClass... -
Hudgens - 06.03.2012
Something like this:
Код:
SetPlayerPos(playerid, 1544.2389,-1360.1006,329.4627);
SetPlayerFacingAngle(playerid,359.4955);
SetPlayerCameraPos(playerid, 1544.2495,-1354.9449,329.4715);
SetPlayerCameraLookAt(playerid, 1544.2389,-1360.1006,329.4627);
?
Re: OnPlayerRequestClass... -
Kyle - 06.03.2012
Quote:
Originally Posted by Hudgens
Something like this:
Код:
SetPlayerPos(playerid, 1544.2389,-1360.1006,329.4627);
SetPlayerFacingAngle(playerid,359.4955);
SetPlayerCameraPos(playerid, 1544.2495,-1354.9449,329.4715);
SetPlayerCameraLookAt(playerid, 1544.2389,-1360.1006,329.4627);
?
|
Try it, see if it works.
AW: OnPlayerRequestClass... -
dalkgamler - 06.03.2012
yes i think that work
Re: OnPlayerRequestClass... -
GNGification - 06.03.2012
This should be all you need
https://sampwiki.blast.hk/wiki/SetPlayerFacingAngle