View Single Post
Old 10/01/2015, 06:06 AM   #4
Daea
Big Clucker
 
Join Date: Dec 2013
Posts: 190
Reputation: 2
Default Re: Текстдрайвы

Code:
//Global Textdraws:

new Text:DartProjectTD[7];


//In public OnGameModeInit():

DartProjectTD[0] = TextDrawCreate(120.000000, 156.916610, "LD_SPAC:white");
TextDrawLetterSize(DartProjectTD[0], 0.000000, 0.000000);
TextDrawTextSize(DartProjectTD[0], 176.250000, 106.750015);
TextDrawAlignment(DartProjectTD[0], 1);
TextDrawColor(DartProjectTD[0], 505290495);
TextDrawSetShadow(DartProjectTD[0], 0);
TextDrawSetOutline(DartProjectTD[0], 0);
TextDrawBackgroundColor(DartProjectTD[0], 0x00000000);
TextDrawFont(DartProjectTD[0], 4);

DartProjectTD[1] = TextDrawCreate(317.875000, 156.749954, "LD_SPAC:white");
TextDrawLetterSize(DartProjectTD[1], 0.000000, 0.000000);
TextDrawTextSize(DartProjectTD[1], 176.250000, 106.750015);
TextDrawAlignment(DartProjectTD[1], 1);
TextDrawColor(DartProjectTD[1], 505290495);
TextDrawSetShadow(DartProjectTD[1], 0);
TextDrawSetOutline(DartProjectTD[1], 0);
TextDrawBackgroundColor(DartProjectTD[1], 0x00000000);
TextDrawFont(DartProjectTD[1], 4);

DartProjectTD[2] = TextDrawCreate(123.125000, 160.416641, "LD_SPAC:white");
TextDrawLetterSize(DartProjectTD[2], 0.000000, 0.000000);
TextDrawTextSize(DartProjectTD[2], 168.750000, 99.166687);
TextDrawAlignment(DartProjectTD[2], 1);
TextDrawColor(DartProjectTD[2], -1105253633);
TextDrawSetShadow(DartProjectTD[2], 0);
TextDrawSetOutline(DartProjectTD[2], 0);
TextDrawBackgroundColor(DartProjectTD[2], 0x00000000);
TextDrawFont(DartProjectTD[2], 4);

DartProjectTD[3] = TextDrawCreate(321.625000, 160.249969, "LD_SPAC:white");
TextDrawLetterSize(DartProjectTD[3], 0.000000, 0.000000);
TextDrawTextSize(DartProjectTD[3], 168.750000, 99.166687);
TextDrawAlignment(DartProjectTD[3], 1);
TextDrawColor(DartProjectTD[3], -34817);
TextDrawSetShadow(DartProjectTD[3], 0);
TextDrawSetOutline(DartProjectTD[3], 0);
TextDrawBackgroundColor(DartProjectTD[3], 0x00000000);
TextDrawFont(DartProjectTD[3], 4);

DartProjectTD[4] = TextDrawCreate(134.375000, 198.333297, "deathmatch          freeroam");
TextDrawLetterSize(DartProjectTD[4], 0.738750, 1.961666);
TextDrawAlignment(DartProjectTD[4], 1);
TextDrawColor(DartProjectTD[4], -1);
TextDrawSetShadow(DartProjectTD[4], 0);
TextDrawSetOutline(DartProjectTD[4], 1);
TextDrawBackgroundColor(DartProjectTD[4], 255);
TextDrawFont(DartProjectTD[4], 1);
TextDrawSetProportional(DartProjectTD[4], 1);

DartProjectTD[5] = TextDrawCreate(155.750000, 238.249923, "36 players");
TextDrawLetterSize(DartProjectTD[5], 0.426250, 1.244166);
TextDrawAlignment(DartProjectTD[5], 1);
TextDrawColor(DartProjectTD[5], -1);
TextDrawSetShadow(DartProjectTD[5], 0);
TextDrawSetOutline(DartProjectTD[5], 1);
TextDrawBackgroundColor(DartProjectTD[5], 255);
TextDrawFont(DartProjectTD[5], 2);
TextDrawSetProportional(DartProjectTD[5], 1);

DartProjectTD[6] = TextDrawCreate(349.875000, 238.083221, "446 players");
TextDrawLetterSize(DartProjectTD[6], 0.426250, 1.244166);
TextDrawAlignment(DartProjectTD[6], 1);
TextDrawColor(DartProjectTD[6], -1);
TextDrawSetShadow(DartProjectTD[6], 0);
TextDrawSetOutline(DartProjectTD[6], 1);
TextDrawBackgroundColor(DartProjectTD[6], 255);
TextDrawFont(DartProjectTD[6], 2);
TextDrawSetProportional(DartProjectTD[6], 1);



stock CloseTDDartProjectTD(playerid)
{
	SetPVarInt(playerid,"TDDartProjectTD",0);
	for(new h = 0;h < 7;h++)
	{
		TextDrawHideForPlayer(playerid,DartProjectTD[h]);
	}
	return 1;
}

stock OpenTDDartProjectTD(playerid)
{
	SetPVarInt(playerid,"TDDartProjectTD",1);
	for(new h = 0;h < 7;h++)
	{
		TextDrawShowForPlayer(playerid,DartProjectTD[h]);
	}
	return 1;
}

Добавьте следующий код, чтобы сделать показ текстдравов по команде!
if(StrCmp(cmd, "/mycommand"))
{
	if(!GetPVarInt(playerid,"TDDartProjectTD"))OpenTDDartProjectTD(playerid);
	else CloseTDDartProjectTD(playerid);
	return true;
}
Не сказал бы что точь-в-точь, но сходство есть

Last edited by Daea; 11/01/2015 at 05:38 AM.
Daea is offline   Reply With Quote