Little help with the texdraws
#1

Well , I didn't worked with them , its the first time.
A friend sent me a program that gives you the code with all done.
But where to put all?


Код:
new Text:ftd;
ftd = TextDrawCreate(0.0, 434.0,"Sample text here");
TextDrawFont(ftd,3);
TextDrawLetterSize(ftd,10,10);
TextDrawColor(ftd,0x0F00FF);
TextDrawSetShadow(ftd,1);
TextDrawSetOutline(ftd,1);
TextDrawBackgroundColor(ftd,0x000FF);
TextDrawUseBox(ftd,0);
Reply
#2

On top of GM:
pawn Код:
new Text:ftd;
OnGameModeInit:
pawn Код:
ftd = TextDrawCreate(0.0, 434.0,"www.wwg.x10.mx");
TextDrawFont(ftd,3);
TextDrawLetterSize(ftd,10,10);
TextDrawColor(ftd,0x0F00FF);
TextDrawSetShadow(ftd,1);
TextDrawSetOutline(ftd,1);
TextDrawBackgroundColor(ftd,0x000FF);
TextDrawUseBox(ftd,0);
To show and hide the textdraw use the functions TextDrawShowForPlayer, TextDrawHideForPlayer, TextDrawShowForAll, TextDrawHideForAll. Hope it helped.
Reply
#3

Quote:

To show and hide the textdraw use the functions TextDrawShowForPlayer, TextDrawHideForPlayer, TextDrawShowForAll, TextDrawHideForAll. Hope it helped.
This same on OnGameModeInit?
Reply
#4

No, you have to use that functions where you want.
Reply
#5

Example script:
pawn Код:
#include <a_samp>

new Text:ftd;

public OnGameModeInit()
{
   
    ftd = TextDrawCreate(0.0, 434.0,"Sample text here");
    TextDrawFont(ftd,3);
    TextDrawLetterSize(ftd,10,10);
    TextDrawColor(ftd,0x0F00FF);
    TextDrawSetShadow(ftd,1);
    TextDrawSetOutline(ftd,1);
    TextDrawBackgroundColor(ftd,0x000FF);
    TextDrawUseBox(ftd,0);
   
    return 1;
}

public OnGameModeExit()
{
    TextDrawDestroy(ftd);
    return 1;
}

public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, ftd);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)