// ***** Special TextDraw by ONEhelsING
#include <a_samp>

new Text:StaticText[MAX_PLAYERS];
new StaticTDUSE[MAX_PLAYERS];

/*
native AddStaticTextForPlayer(playerid, text[], font, style, delta);
native DistroyStaticTextForPlayer(playerid);
*/

stock AddStaticTextForPlayer(playerid, text[], font, style, delta)
{    
    if(StaticTDUSE[playerid] == 1)
	{
    	TextDrawDestroy(StaticText[playerid]);
	}    
    new Float:TEXTX,Float:TEXTY;
    if (style == 1) TEXTX = 280, TEXTY = 400;
    else if (style == 2) TEXTX = 300, TEXTY = 300;
    else if (style == 3) TEXTX = 401, TEXTY = 376;
    else if (style == 4) TEXTX = 1, TEXTY = 376;
    else if (style == 5) TEXTX = 10, TEXTY = 160;	
    else TEXTX = 246, TEXTY = 142;    
    StaticText[playerid] = TextDrawCreate(TEXTX,TEXTY,text);
    if(style == 5)
	{
	TextDrawUseBox(StaticText[playerid],1);
	TextDrawTextSize(StaticText[playerid],150,200);
	TextDrawBoxColor(StaticText[playerid],0x00000055);
	}
    if(style == 2)
	{
   	TextDrawUseBox(StaticText[playerid],1);
	TextDrawBoxColor(StaticText[playerid],0x00aa00ff);	
	TextDrawTextSize(StaticText[playerid],TEXTX+delta, 0);
	}
    if(style != 2)
	{
	TextDrawAlignment(StaticText[playerid],0);	
	TextDrawFont(StaticText[playerid],font);
	TextDrawLetterSize(StaticText[playerid],0.500000,2.000000);
	TextDrawColor(StaticText[playerid],0xffffffff);	
	TextDrawSetProportional(StaticText[playerid],1);
	TextDrawBackgroundColor(StaticText[playerid],0x000000ff);
	TextDrawSetOutline(StaticText[playerid],1);
	TextDrawSetShadow(StaticText[playerid],1);
	}		
	TextDrawShowForPlayer(playerid,StaticText[playerid]);
	StaticTDUSE[playerid] = 1;	
}

stock DistroyStaticTextForPlayer(playerid)
{ 
    TextDrawDestroy(StaticText[playerid]);
    StaticTDUSE[playerid] = 0;	
    return true;
}
