SA-MP Forums Archive
Little help with the texdraws - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little help with the texdraws (/showthread.php?tid=283496)



Little help with the texdraws - FrostDoggy - 15.09.2011

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);



Re: Little help with the texdraws - Anzipane! - 15.09.2011

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.


Re: Little help with the texdraws - FrostDoggy - 15.09.2011

Quote:

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


Re: Little help with the texdraws - Anzipane! - 15.09.2011

No, you have to use that functions where you want.


Re: Little help with the texdraws - iPLEOMAX - 15.09.2011

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;
}