OnPlayerRequestClass...
#1

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;
}
Reply
#2

Save the position of you looking at the place where you want to see the face (/save) and use the coords in SetPlayerCameraPos.
Reply
#3

Doesn't that just change where I see the character, and not where the character stands? ..
Reply
#4

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);
Reply
#5

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);
?
Reply
#6

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

yes i think that work
Reply
#8

This should be all you need

https://sampwiki.blast.hk/wiki/SetPlayerFacingAngle
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)