Доступ к готовым решениям

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Мануал [/inv] в TextDrawe

Статус
В этой теме нельзя размещать новые ответы.

Merlin

Умник
Ко всем new Добавим
PHP:
new Text:RakNetCopy[16];
new Text:Background, Text:NewMSG;
В public OnGameModeInit()//события, когда загружается мод
PHP:
//=========================================
 	RakNetCopy[0] = TextDrawCreate(230.000000, 120.000000, "_");
	TextDrawBackgroundColor(RakNetCopy[0], 255);
	TextDrawFont(RakNetCopy[0], 1);
	TextDrawLetterSize(RakNetCopy[0], 0.500000, 34.199996);
	TextDrawColor(RakNetCopy[0], -1);
	TextDrawSetOutline(RakNetCopy[0], 0);
	TextDrawSetProportional(RakNetCopy[0], 1);
	TextDrawSetShadow(RakNetCopy[0], 1);
	TextDrawUseBox(RakNetCopy[0], 1);
	TextDrawBoxColor(RakNetCopy[0], 0xF100FF44);
	TextDrawTextSize(RakNetCopy[0], 30.000000, 0.000000);
	TextDrawSetSelectable(RakNetCopy[0], 0);


	RakNetCopy[1] = TextDrawCreate(220.000000, 329.000000, "_");
	TextDrawBackgroundColor(RakNetCopy[1], 255);
	TextDrawFont(RakNetCopy[1], 1);
	TextDrawLetterSize(RakNetCopy[1], 0.500000, 8.500000);
	TextDrawColor(RakNetCopy[1], -1);
	TextDrawSetOutline(RakNetCopy[1], 0);
	TextDrawSetProportional(RakNetCopy[1], 1);
	TextDrawSetShadow(RakNetCopy[1], 1);
	TextDrawUseBox(RakNetCopy[1], 1);
	TextDrawBoxColor(RakNetCopy[1], 0x38917fff);
	TextDrawTextSize(RakNetCopy[1], 40.000000, 0.000000);
	TextDrawSetSelectable(RakNetCopy[1], 0);

	RakNetCopy[2] = TextDrawCreate(170.000000, 411.000000, "_");
	TextDrawBackgroundColor(RakNetCopy[2], 255);
	TextDrawFont(RakNetCopy[2], 1);
	TextDrawLetterSize(RakNetCopy[2], 0.500000, 1.500000);
	TextDrawColor(RakNetCopy[2], -1);
	TextDrawSetOutline(RakNetCopy[2], 0);
	TextDrawSetProportional(RakNetCopy[2], 1);
	TextDrawSetShadow(RakNetCopy[2], 1);
	TextDrawUseBox(RakNetCopy[2], 1);
	TextDrawBoxColor(RakNetCopy[2], 0x38917fff);
	TextDrawTextSize(RakNetCopy[2], 90.000000, 0.000000);
	TextDrawSetSelectable(RakNetCopy[2], 0);

	RakNetCopy[3] = TextDrawCreate(53.0000,136.0000, "NonStop Vectra - RP");
	TextDrawBackgroundColor(RakNetCopy[3], 255);
	TextDrawFont(RakNetCopy[3], 1);
	TextDrawLetterSize(RakNetCopy[3], 0.500000, 1.000000);
	TextDrawColor(RakNetCopy[3], 0x5ACCF0FF);
	TextDrawSetOutline(RakNetCopy[3], 0);
	TextDrawSetProportional(RakNetCopy[3], 1);
	TextDrawSetShadow(RakNetCopy[3], 1);

	RakNetCopy[4] = TextDrawCreate(83.000000, 156.000000, "_"); // Скин
	TextDrawAlignment(RakNetCopy[4], 2);
	TextDrawBackgroundColor(RakNetCopy[4], 0x38917fff);
	TextDrawFont(RakNetCopy[4], 5);
	TextDrawLetterSize(RakNetCopy[4], -0.099999, -0.400000);
	TextDrawColor(RakNetCopy[4], -1);
	TextDrawSetOutline(RakNetCopy[4], 0);
	TextDrawSetProportional(RakNetCopy[4], 0);
	TextDrawSetShadow(RakNetCopy[4], 1);
	TextDrawUseBox(RakNetCopy[4], 1);
	TextDrawBoxColor(RakNetCopy[4], 0x9326C077);
	TextDrawTextSize(RakNetCopy[4], 97.000000, 120.000000);
	TextDrawSetPreviewModel(RakNetCopy[4], 0);
	TextDrawSetPreviewRot(RakNetCopy[4], 0.000000, 0.000000, 0.000000, 1.000000);
	TextDrawSetSelectable(RakNetCopy[4], 1);

	RakNetCopy[5] = TextDrawCreate(50.000000, 352.000000, "LD_BEAT:left");
	TextDrawFont(RakNetCopy[5], 4);
	TextDrawTextSize(RakNetCopy[5], 29.000000, 30.000000);
	TextDrawSetSelectable(RakNetCopy[5], 1);

	RakNetCopy[6] = TextDrawCreate(180.000000, 352.000000, "LD_BEAT:right");
	TextDrawFont(RakNetCopy[6], 4);
	TextDrawTextSize(RakNetCopy[6], 29.000000, 30.000000);
	TextDrawSetSelectable(RakNetCopy[6], 1);

	RakNetCopy[7] = TextDrawCreate(90.000000, 334.000000, "_"); //BAG
	TextDrawFont(RakNetCopy[7], TEXT_DRAW_FONT_MODEL_PREVIEW);
	TextDrawBackgroundColor(RakNetCopy[7], 0xFFFFFF00);
	TextDrawUseBox(RakNetCopy[7], 0);
	TextDrawTextSize(RakNetCopy[7], 80.000000, 66.000000);
	TextDrawSetPreviewRot(RakNetCopy[7], -10.0, 0.0, -20.0,0.8);
	TextDrawSetSelectable(RakNetCopy[7], 1);
	TextDrawSetPreviewModel(RakNetCopy[7], 1210);
	//==================================================
	RakNetCopy[8] = TextDrawCreate(105.000000, 411.000000, "CLOSE");
	TextDrawBackgroundColor(RakNetCopy[8], 255);
	TextDrawFont(RakNetCopy[8], 1);
	TextDrawLetterSize(RakNetCopy[8], 0.519999, 1.299999);
	TextDrawColor(RakNetCopy[8], -1);
	TextDrawSetOutline(RakNetCopy[8], 0);
	TextDrawSetProportional(RakNetCopy[8], 1);
	TextDrawTextSize(RakNetCopy[8], 150.000000, 18.000000);
	TextDrawSetShadow(RakNetCopy[8], 1);
	TextDrawSetSelectable(RakNetCopy[8], 1);
	//======================================================== //BL 0xFFFFFF00 BOX 0

	RakNetCopy[9] = TextDrawCreate(90.000000, 334.000000, "_"); //Телефон 18873 18871 18872 18870 18869 18868 18867 18866
	TextDrawBackgroundColor(RakNetCopy[9], 0xFFFFFF00);
	TextDrawUseBox(RakNetCopy[9], 0);
	TextDrawFont(RakNetCopy[9], TEXT_DRAW_FONT_MODEL_PREVIEW);
	TextDrawTextSize(RakNetCopy[9], 80.000000, 66.000000);
	TextDrawSetPreviewRot(RakNetCopy[9], -10.0, 0.0, -20.0,0.8);
	TextDrawSetPreviewModel(RakNetCopy[9], 18874);
	TextDrawSetSelectable(RakNetCopy[9], 1);


	RakNetCopy[10] = TextDrawCreate(90.000000, 334.000000, "_"); //Машина
	TextDrawFont(RakNetCopy[10], TEXT_DRAW_FONT_MODEL_PREVIEW);
	TextDrawBackgroundColor(RakNetCopy[10], 0xFFFFFF00);
	TextDrawUseBox(RakNetCopy[10], 0);
	TextDrawTextSize(RakNetCopy[10], 80.000000, 66.000000);
	TextDrawSetPreviewRot(RakNetCopy[10], -10.0, 0.0, -20.0,0.8);
	TextDrawSetPreviewModel(RakNetCopy[10], 1314);
	TextDrawSetSelectable(RakNetCopy[10], 1);

	RakNetCopy[11] = TextDrawCreate(90.000000, 334.000000, "_"); //Репорт
	TextDrawFont(RakNetCopy[11], TEXT_DRAW_FONT_MODEL_PREVIEW);
	TextDrawBackgroundColor(RakNetCopy[11], 0xFFFFFF00);
	TextDrawUseBox(RakNetCopy[11], 0);
	TextDrawTextSize(RakNetCopy[11], 80.000000, 66.000000);
	TextDrawSetPreviewRot(RakNetCopy[11], -10.0, 0.0, -20.0,0.8);
	TextDrawSetPreviewModel(RakNetCopy[11], 19273);
	TextDrawSetSelectable(RakNetCopy[11], 1);

	RakNetCopy[12] = TextDrawCreate(90.000000, 334.000000, "_"); //GPS
	TextDrawFont(RakNetCopy[12], TEXT_DRAW_FONT_MODEL_PREVIEW);
	TextDrawBackgroundColor(RakNetCopy[12], 0xFFFFFF00);
	TextDrawUseBox(RakNetCopy[12], 0);
	TextDrawTextSize(RakNetCopy[12], 80.000000, 66.000000);
	TextDrawSetPreviewRot(RakNetCopy[12], -10.0, 0.0, -20.0,0.8);
	TextDrawSetPreviewModel(RakNetCopy[12], 18875);
	TextDrawSetSelectable(RakNetCopy[12], 1);

	RakNetCopy[13] = TextDrawCreate(90.000000, 334.000000, "_"); //ЧАСЫ
	TextDrawFont(RakNetCopy[13], TEXT_DRAW_FONT_MODEL_PREVIEW);
	TextDrawBackgroundColor(RakNetCopy[13], 0xFFFFFF00);
	TextDrawUseBox(RakNetCopy[13], 0);
	TextDrawTextSize(RakNetCopy[13], 80.000000, 66.000000);
	TextDrawSetPreviewRot(RakNetCopy[13], -10.0, 0.0, -20.0,0.8);
	TextDrawSetPreviewModel(RakNetCopy[13], 19040);
	TextDrawSetSelectable(RakNetCopy[13], 1);

	RakNetCopy[14] = TextDrawCreate(90.000000, 334.000000, "_"); //DONATE
	TextDrawFont(RakNetCopy[14], TEXT_DRAW_FONT_MODEL_PREVIEW);
	TextDrawBackgroundColor(RakNetCopy[14], 0xFFFFFF00);
	TextDrawUseBox(RakNetCopy[14], 0);
	TextDrawTextSize(RakNetCopy[14], 80.000000, 66.000000);
	TextDrawSetPreviewRot(RakNetCopy[14], -10.0, 0.0, -20.0,0.8);
	TextDrawSetPreviewModel(RakNetCopy[14], 1550);
	TextDrawSetSelectable(RakNetCopy[14], 1);
	//=========================================
к stock Добавим
PHP:
stock CloseHTDX(playerid)
{
	CancelSelectTextDraw(playerid);
	for(new i; i < sizeof(RakNetCopy); i++) TextDrawHideForPlayer(playerid,RakNetCopy[i]);
	DeletePVar(playerid,"InvH");
}
stock HideYMenu(playerid)
{
	TextDrawHideForPlayer(playerid,RakNetCopy[7]),TextDrawHideForPlayer(playerid,RakNetCopy[9]);
	TextDrawHideForPlayer(playerid,RakNetCopy[10]),TextDrawHideForPlayer(playerid,RakNetCopy[11]);
	TextDrawHideForPlayer(playerid,RakNetCopy[12]),TextDrawHideForPlayer(playerid,RakNetCopy[13]);
	TextDrawHideForPlayer(playerid,RakNetCopy[14]);
}
stock SetPlayerCheckpointEx(playerid, Float:x, Float:y, Float:z, type)
{
	if(type == CHECKPOINT_PLAYER) SetPlayerRaceCheckpoint(playerid, 2, Float:x, Float:y, Float:z, Float:x, Float:y, Float:z, 2.0);
	else if(type == CHECKPOINT_VEHICLE) SetPlayerRaceCheckpoint(playerid, 2, Float:x, Float:y, Float:z, Float:x, Float:y, Float:z, 5.0);
	return true;
}
В public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
PHP:
if(newkeys == KEY_YES)
	{
		TextDrawSetPreviewModel(RakNetCopy[4], GetPlayerSkin(playerid)); // - Работает
		for(new i; i < sizeof(RakNetCopy); i++) TextDrawShowForPlayer(playerid,RakNetCopy[i]);
		SelectTextDraw(playerid,0xf2ddc6ff); SetPVarInt(playerid,"ListBack",0);
		TextDrawHideForPlayer(playerid,RakNetCopy[9]); TextDrawHideForPlayer(playerid,RakNetCopy[10]);
		TextDrawHideForPlayer(playerid,RakNetCopy[11]); TextDrawHideForPlayer(playerid,RakNetCopy[12]);
		TextDrawHideForPlayer(playerid,RakNetCopy[13]); TextDrawHideForPlayer(playerid,RakNetCopy[14]);
		TextDrawHideForPlayer(playerid, Background); TextDrawHideForPlayer(playerid, NewMSG);
	}
В public OnPlayerClickTextDraw(playerid, Text:clickedid)
PHP:
if(clickedid == RakNetCopy[4]) { CloseHTDX(playerid); ShowStats(playerid, playerid);}
	if(clickedid == RakNetCopy[7]) { CloseHTDX(playerid); OnPlayerCommandText(playerid, "/inventar"); }
	if(clickedid == RakNetCopy[8]) { CloseHTDX(playerid); }
	if(clickedid == RakNetCopy[9]) { CloseHTDX(playerid); OnPlayerCommandText(playerid, "/phone");}
	if(clickedid == RakNetCopy[11]) { CloseHTDX(playerid); ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "Отправить жалобу", "Вы собираетесь отправить администрации сообщение с жалобой\nОтпровляйте по форме [ID/ник нарушитиля] [Текст жалобы]", "Отправить", "Назад"); }
	if(clickedid == RakNetCopy[12]) { CloseHTDX(playerid); OnPlayerCommandText(playerid, "/gps");}
	if(clickedid == RakNetCopy[13]) { CloseHTDX(playerid); OnPlayerCommandText(playerid, "/time");}
	if(clickedid == RakNetCopy[14]) { CloseHTDX(playerid); OnPlayerCommandText(playerid, "/donate");}
	if(clickedid == RakNetCopy[10])
	{
		CloseHTDX(playerid); new Float:POS[3];
		if(PlayerInfo[playerid][pCar] == 0) return SCM(playerid, COLOR_GREEN, "У тебя нету автомобиля");
		if(PlayerInfo[playerid][pCarx] == 0 && PlayerInfo[playerid][pCary] == 0) return SCM(playerid, COLOR_GREEN, "Для начала припаркуйте автомобиль ((/park))");
		GetVehiclePos(CarIdHouse[playerid], POS[0], POS[1], POS[2]);
		SetPlayerCheckpointEx(playerid, POS[0], POS[1], POS[2], CHECKPOINT_VEHICLE);
	}
	if(clickedid == RakNetCopy[6]) //6 - право 5 - лево
	{
		if(GetPVarInt(playerid,"ListBack") == 0) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[7]); SetPVarInt(playerid,"ListBack",1);}
		else if(GetPVarInt(playerid,"ListBack") == 1) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[9]); SetPVarInt(playerid,"ListBack",2);}
		else if(GetPVarInt(playerid,"ListBack") == 2) { HideYMenu(playerid); TextDrawSetPreviewModel(RakNetCopy[10], PlayerInfo[playerid][pCar]); TextDrawShowForPlayer(playerid,RakNetCopy[10]); SetPVarInt(playerid,"ListBack",3);}
		else if(GetPVarInt(playerid,"ListBack") == 3) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[11]); SetPVarInt(playerid,"ListBack",4);}
		else if(GetPVarInt(playerid,"ListBack") == 4) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[12]); SetPVarInt(playerid,"ListBack",5);}
		else if(GetPVarInt(playerid,"ListBack") == 5) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[13]); SetPVarInt(playerid,"ListBack",6);}
		else if(GetPVarInt(playerid,"ListBack") >= 6) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[14]); SetPVarInt(playerid,"ListBack",0);}
	}
	if(clickedid == RakNetCopy[5]) //6 - право 5 - лево
	{
		if(GetPVarInt(playerid,"ListBack") == 0) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[7]); SetPVarInt(playerid,"ListBack",6);}
		else if(GetPVarInt(playerid,"ListBack") == 1) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[9]); SetPVarInt(playerid,"ListBack",0);}
		else if(GetPVarInt(playerid,"ListBack") == 2) { HideYMenu(playerid); TextDrawSetPreviewModel(RakNetCopy[10], PlayerInfo[playerid][pCar]); TextDrawShowForPlayer(playerid,RakNetCopy[10]); SetPVarInt(playerid,"ListBack",1);}
		else if(GetPVarInt(playerid,"ListBack") == 3) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[11]); SetPVarInt(playerid,"ListBack",2);}
		else if(GetPVarInt(playerid,"ListBack") == 4) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[12]); SetPVarInt(playerid,"ListBack",3);}
		else if(GetPVarInt(playerid,"ListBack") == 5) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[13]); SetPVarInt(playerid,"ListBack",4);}
		else if(GetPVarInt(playerid,"ListBack") >= 6) { HideYMenu(playerid); TextDrawShowForPlayer(playerid,RakNetCopy[14]); SetPVarInt(playerid,"ListBack",5);}
	}
К #define
PHP:
#define CHECKPOINT_VEHICLE  1
#define CHECKPOINT_PLAYER   2
В enum pInfo
PHP:
	pCarx,
    pCary,
Ну вот и всё)
Автор вырезки : Merlin

 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу