PlayerTextDrawFont

warning

This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions!

Description

Change the font of a player-textdraw.

NameDescription
playeridThe ID of the player whose player-textdraw to change the font of
textThe ID of the player-textdraw to change the font of
fontThere are four font styles as shown below. A font value greater than 3 does not display, and anything greater than 16 crashes the client.

Available Fonts:

|

Returns

This function does not return any specific values.

Examples

new PlayerText:gWelcomeText[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
// First, create the textdraw
gWelcomeText[playerid] = CreatePlayerTextDraw(playerid, 240.0, 580.0, "Welcome to my SA-MP server");
// Set the font of player-textdraw 'gWelcomeText' to 2.
PlayerTextDrawFont(playerid, gWelcomeText[playerid], 2);
}
public OnPlayerDisconnect(playerid)
{
PlayerTextDrawHide(playerid, gWelcomeText[playerid]);
}

Related Functions