open.mp | PlayerTextDrawSetPreviewRot
  • Home
  • FAQ
  • Forum
  • Servers
  • Docs
  • Blog
  • Login
  • Englishاللغة العربيةar-TNবাংলাbosanski jezikDeutschΕλληνικάEspañoleestiفارسیFrançaisHrvatskimagyarBahasa IndonesiaItaliano日本語ქართულიlietuvių kalbaNederlandsNorskjęzyk polskiPortuguêsRomânăРусскийslovenski jezikсрпски језикไทยWikang TagalogTürkçeУкраїнськаاردوTiếng Việt简体中文繁體中文
warning Not Translated

This page has not been translated into the language that your browser requested. The English content is being shown as a fallback.

If you want to contribute a translation for this page then please click here.

PlayerTextDrawSetPreviewRot

warning

This function was added in SA-MP 0.3x and will not work in earlier versions!

Description

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

NameDescription
playeridThe ID of the player whose player-textdraw to change.
PlayerText:textThe ID of the player-textdraw to change.
Float:fRotXThe X rotation value.
Float:fRotYThe Y rotation value.
Float:fRotZThe Z rotation value.
Float:fZoomThe zoom value, default value 1.0, smaller values make the camera closer and larger values make the camera further away.

Returns

This function does not return any specific values.

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]);
    return 1;
}

Notes

warning

The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW and already have a model set in order for this function to have effect.

Related Functions

  • TextDrawSetPreviewRot: Set rotation of a 3D textdraw preview.
  • PlayerTextDrawSetPreviewModel: Set model ID of a 3D player textdraw preview.
  • PlayerTextDrawSetPreviewVehCol: Set the colours of a vehicle in a 3D player textdraw preview.
  • PlayerTextDrawFont: Set the font of a player-textdraw.
  • OnPlayerClickPlayerTextDraw: Called when a player clicks on a player-textdraw.

Community

  • Discord
  • Instagram
  • Twitter
  • Twitch
  • YouTube
  • Facebook
  • VK

More

  • SA-MP
  • Blog
  • GitHub