Teleport Textdraws
#2

Its Easy, Just Do Like This.

First Define
Код:
#define MAX_LINES 3
new Text:TeleportTextdraws[MAX_PLAYERS][MAX_LINES];
new TeleportTextdrawsStr[MAX_PLAYERS][MAX_LINES][256];
use this under your gamemode

Код:
format(TeleportTextdrawsStr[playerid][0], 256, " ");
format(TeleportTextdrawsStr[playerid][1], 256, " ");
format(TeleportTextdrawsStr[playerid][2], 256, " ");

TeleportTextdraws[playerid][0] = TextDrawCreate(342.000000, 400.000000, TeleportTextdrawsStr[playerid][0]);
TextDrawBackgroundColor(TeleportTextdraws[playerid][0], 255);
TextDrawAlignment(TeleportTextdraws[playerid][0],2);
TextDrawFont(TeleportTextdraws[playerid][0],1);
TextDrawLetterSize(TeleportTextdraws[playerid][0],0.230000, 0.799999);
TextDrawSetOutline(TeleportTextdraws[playerid][0],1);
TextDrawSetProportional(TeleportTextdraws[playerid][0],1);
TextDrawSetShadow(TeleportTextdraws[playerid][0],0x000000AA);

TeleportTextdraws[playerid][1] = TextDrawCreate(342.000000, 377.000000, TeleportTextdrawsStr[playerid][1]);
TextDrawBackgroundColor(TeleportTextdraws[playerid][1], 255);
TextDrawAlignment(TeleportTextdraws[playerid][1],2);
TextDrawFont(TeleportTextdraws[playerid][1],1);
TextDrawLetterSize(TeleportTextdraws[playerid][1],0.230000, 0.799999);
TextDrawSetOutline(TeleportTextdraws[playerid][1],1);
TextDrawSetProportional(TeleportTextdraws[playerid][1],1);
TextDrawSetShadow(TeleportTextdraws[playerid][1],0x000000AA);

TeleportTextdraws[playerid][2] = TextDrawCreate(342.000000, 356.000000,                                       TeleportTextdrawsStr[playerid][2]);
TextDrawBackgroundColor(TeleportTextdraws[playerid][2], 255);
TextDrawAlignment(TeleportTextdraws[playerid][2],2);
TextDrawFont(TeleportTextdraws[playerid][2],1);
TextDrawLetterSize(TeleportTextdraws[playerid][2],0.230000, 0.799999);
TextDrawSetOutline(TeleportTextdraws[playerid][2],1);
TextDrawSetProportional(TeleportTextdraws[playerid][2],1);
TextDrawSetShadow(TeleportTextdraws[playerid][2],0x000000AA);
Код:
stock TeleportTextdraws(playerid,message[])
{
	format(TeleportTextdrawsStr[playerid][2], 256, "%s",TeleportTextdrawsStr[playerid][1]);
	TextDrawSetString(TeleportTextdraws[playerid][2], TeleportTextdrawsStr[playerid][2]);

	format(TeleportTextdrawsStr[playerid][1], 256, "%s",TeleportTextdrawsStr[playerid][0]);
	TextDrawSetString(TeleportTextdraws[playerid][1], TeleportTextdrawsStr[playerid][1]);

	format(TeleportTextdrawsStr[playerid][0], 256, "%s",message);
	TextDrawSetString(TeleportTextdraws[playerid][0], TeleportTextdrawsStr[playerid][0]);
}
if u want to send to all?
use this
Код:
stock TeleportTextdrawsToAll(message[])
{
	for(new i = 0; i < GetMaxPlayers(); i++)
	{
	TeleportTextdraws(i,message);
	}
}
and simply add this on your teleport commands.

example:
To Send All
Код:
format(string, sizeof(string), "Your Message");
TeleportTextdrawsToAll(string);
To a Player
Код:
format(string, sizeof(string), "Your Message");
TeleportTextdraws(playerid or targetid u want,string);
Reply


Messages In This Thread
Teleport Textdraws - by GeekSiMo - 03.07.2014, 23:23
Re: Teleport Textdraws - by danish007 - 04.07.2014, 19:22
Re: Teleport Textdraws - by GeekSiMo - 20.07.2014, 01:33
Re: Teleport Textdraws - by danish007 - 21.07.2014, 11:02

Forum Jump:


Users browsing this thread: 1 Guest(s)