Posts: 159
Threads: 103
Joined: Apr 2017
Reputation:
0
Hi,
What animation with what parameters i need to make, that i could make like that, player can't move, but he can change his angle
I'am using like that:
ApplyAnimation(playerid, "PED", "IDLE_STANCE", 4.1, 1, 1, 1, 1, 1, 1);
But no work..
Posts: 89
Threads: 23
Joined: Dec 2012
Reputation:
0
You could do this with SetPlayerFacingAngle
Posts: 1,046
Threads: 250
Joined: Nov 2014
Reputation:
0
what you've showed is a selfie fs and I am pretty sure that he changed camera facing angle when moving it.
Posts: 159
Threads: 103
Joined: Apr 2017
Reputation:
0
In that fs i press a w s d and it change my angle
if(PRESSED(KEY_ANALOG_RIGHT))
{
GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
static Float: n1X, Float: n1Y;
if(Degree[playerid] >= 360) Degree[playerid] = 0;
Degree[playerid] += Speed;
n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
}
if(PRESSED(KEY_ANALOG_LEFT))
{
GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
static Float: n1X, Float: n1Y;
if(Degree[playerid] >= 360) Degree[playerid] = 0;
Degree[playerid] -= Speed;
n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
}
Here just for numpad 4 6