Lewati ke konten utama

PlayerTextDrawGetPreviewRot

peringatan

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Gets the rotation and zoom of a 3D model preview player-textdraw.

NameDescription
playeridThe ID of the player.
PlayerText:textidThe ID of the player-textdraw to get rotation and zoom of.
&Float:rotationXA float variable into which to store rotationX coordinate, passed by reference.
&Float:rotationYA float variable into which to store rotationY coordinate, passed by reference.
&Float:rotationZA float variable into which to store rotationZ coordinate, passed by reference.
&Float:zoomA float variable into which to store zoom value, passed by reference.

Examples

new PlayerText:gMyTextdraw[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
gMyTextdraw[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "_");
PlayerTextDrawFont(playerid, gMyTextdraw[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawUseBox(playerid, gMyTextdraw[playerid], 1);
PlayerTextDrawBoxColor(playerid, gMyTextdraw[playerid], 0x000000FF);
PlayerTextDrawTextSize(playerid, gMyTextdraw[playerid], 40.0, 40.0);
PlayerTextDrawSetPreviewModel(playerid, gMyTextdraw[playerid], 411);
PlayerTextDrawSetPreviewRot(playerid, gMyTextdraw[playerid], -10.0, 0.0, -20.0, 1.0);
PlayerTextDrawShow(playerid, gMyTextdraw[playerid]);

new Float:rotationX, Float:rotationY, Float:rotationZ, Float:zoom;
PlayerTextDrawGetPreviewRot(playerid, gMyTextdraw[playerid], rotationX, rotationY, rotationZ, zoom);
// rotationX = -10.0
// rotationY = 0.0
// rotationZ = -20.0
// zoom = 1.0
return 1;
}