Доступ к архиву

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

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

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

Спидометр для Engine-Rp

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

nevagno

Умник
Всем привет, спидометр вырезал из мода Mystic Role Play чуточку его переделал, добавил бокс изменил цвет (вы можете его тоже изменить)

в
PHP:
stock LoadTextDraws()
находите строки:
PHP:
 Speed = TextDrawCreate...
    Health = TextDrawCreate..
    Fuell = TextDrawCreate..
заменяете на мои до VehBox
PHP:
    Speed = TextDrawCreate(503.000000,339.000000,"SPEED :");
    Speed1 = TextDrawCreate(503.000000,339.000000,"SPEED :");
    Health = TextDrawCreate(503.000000,326.000000,"VEH. HEALTH :");
    Fuell = TextDrawCreate(503.000000,313.000000,"FUELL :");

    TextDrawLetterSize(Speed,0.259999,1.110000);
    TextDrawLetterSize(Speed1,0.259999,1.110000);
    TextDrawLetterSize(Health,0.245999,1.110000);
	TextDrawLetterSize(Fuell,0.259999,1.010000);

	TextDrawFont(Fuell,2);
	TextDrawFont(Speed,2);
	TextDrawFont(Speed1,2);
    TextDrawFont(Health,2);

    TextDrawBackgroundColor(Fuell,COLOR_BLACK);
    TextDrawBackgroundColor(Speed,COLOR_BLACK);
    TextDrawBackgroundColor(Speed1,COLOR_BLACK);
	TextDrawBackgroundColor(Health,COLOR_BLACK);

    TextDrawColor(Fuell,COLOR_LIGHTBLUE);
    TextDrawColor(Speed,COLOR_LIGHTBLUE);
    TextDrawColor(Speed1,COLOR_LIGHTBLUE);
	TextDrawColor(Health,COLOR_LIGHTBLUE);

	TextDrawSetOutline(Fuell,1);
	TextDrawSetOutline(Speed,1);
	TextDrawSetOutline(Speed1,1);
	TextDrawSetOutline(Health,1);

	TextDrawSetProportional(Fuell,1);
	TextDrawSetProportional(Speed,1);
	TextDrawSetProportional(Speed1,1);
	TextDrawSetProportional(Health,1);

	TextDrawSetShadow(Fuell,1);
	TextDrawSetShadow(Speed,1);
	TextDrawSetShadow(Speed1,1);
	TextDrawSetShadow(Health,1); 

	Box = TextDrawCreate(555.0, 300.0, "_");
	TextDrawUseBox(Box, 1);
	TextDrawBoxColor(Box, COLOR_BOX);
	TextDrawTextSize(Box, 0.0, 120.0);
	TextDrawLetterSize(Box, 0.0, 12.0);
	TextDrawAlignment(Box, 2);
Заменяем public update speedometr на мой

PHP:
public UpdateSpeedometr(playerid)
{
    if(GetPlayerState(playerid) == 2)
	{
	  	new locked[32],str[64],str2[64],str3[64],str4[64], str5[64], str6[64], str7[64], Float:vehhel, vehh[20], vehs[20], vehe[20], veher[20];
	    if(IsLocked[GetPlayerVehicleID(playerid)] == true) locked = "~r~LOCK";
 		else locked = "~g~UNLOCK";

		GetVehicleHealth(GetPlayerVehicleID(playerid), vehhel);
		if(vehhel <= 500) vehh = "~r~";
		else vehh = "";
		if(Fuel[GetPlayerVehicleID(playerid)] / 2 <= 30) vehs = "~r~";
		else vehs = "";
		if(Engine[GetPlayerVehicleID(playerid)] == true) vehe = "~g~ON";
		else vehe = "~r~OFF";
		if(VehRe[playerid] == true) veher = "~g~MAX";
		else veher = "~r~MAX";

		format(str, sizeof(str),"%d KM/H",SpeedVehicle(playerid) / 2);
		if(vehhel <= 300) format(str3, sizeof(str3),"%s30%",vehh); else format(str3, sizeof(str3),"%s%.0f%",vehh,vehhel / 10);
		format(str2, sizeof(str2), "%s", locked);
	    format(str4, sizeof(str4), "%s%d%", vehs,Fuel[GetPlayerVehicleID(playerid)] / 2);
	 	format(str5, sizeof(str5), "%s", vehe);
	 	format(str6, sizeof(str6), "%s", veher);
		new Float:ms;
		ms = (SpeedVehicle(playerid)/3.6)/1000;// мутим по формуле километраж
        VehInfo[GetPlayerVehicleID(playerid)][Mileage] += ms;
		format(str7, sizeof(str7), "%.0f", PlayerInfo[playerid][pGunSkill][0]);

		TextDrawSetString(FuelShow[playerid],str4);
		TextDrawSetString(HealthShow[playerid],str3);
		TextDrawSetString(SpeedShow[playerid],str);
		TextDrawSetString(StatusShow[playerid],str2);
		TextDrawSetString(Speed2Show[playerid],str6);
		TextDrawSetString(EngineShow[playerid],str5);
		TextDrawSetString(Textdraw5s[playerid],str7);

		if(!SpecialVehicle(GetPlayerVehicleID(playerid))) UnSurfCar(GetPlayerVehicleID(playerid));
	}
	return 0;
}
и в stock CreateTextDraws(playerid)

заменяем все до VehNazv

PHP:
	FuelShow[playerid] = TextDrawCreate(546.000000,313.000000, "_");
	TextDrawBackgroundColor(FuelShow[playerid], COLOR_BLACK);
	TextDrawLetterSize(FuelShow[playerid],0.259999,1.110000);
	TextDrawFont(FuelShow[playerid], 2);
	TextDrawColor(FuelShow[playerid], COLOR_LIGHTYELLOW);
	TextDrawSetOutline(FuelShow[playerid], 1);
	TextDrawSetProportional(FuelShow[playerid],1);
	TextDrawSetShadow(FuelShow[playerid],1);

	SpeedShow[playerid] = TextDrawCreate(546.000000,340.000000,"0km/h");
	TextDrawBackgroundColor(SpeedShow[playerid],COLOR_BLACK);
	TextDrawLetterSize(SpeedShow[playerid],0.259999,1.110000);
	TextDrawFont(SpeedShow[playerid],2);
	TextDrawColor(SpeedShow[playerid],COLOR_LIGHTYELLOW);
	TextDrawSetOutline(SpeedShow[playerid],1);
	TextDrawSetProportional(SpeedShow[playerid],1);
	TextDrawSetShadow(SpeedShow[playerid],1);

	HealthShow[playerid] = TextDrawCreate(582.000000,326.000000,"0%");
	TextDrawBackgroundColor(HealthShow[playerid],COLOR_BLACK);
	TextDrawLetterSize(HealthShow[playerid],0.259999,1.110000);
	TextDrawFont(HealthShow[playerid],2);
	TextDrawColor(HealthShow[playerid],COLOR_LIGHTYELLOW);
	TextDrawSetOutline(HealthShow[playerid],1);
	TextDrawSetProportional(HealthShow[playerid],1);
	TextDrawSetShadow(HealthShow[playerid],1);

	StatusShow[playerid] = TextDrawCreate(532.000000,390.000000, "_");
	TextDrawBackgroundColor(StatusShow[playerid], COLOR_BLACK);
	TextDrawLetterSize(StatusShow[playerid],0.259999,1.010000);
	TextDrawFont(StatusShow[playerid], 2);
	TextDrawColor(StatusShow[playerid], COLOR_WHITE);
	TextDrawSetOutline(StatusShow[playerid], 1);
	TextDrawSetProportional(StatusShow[playerid],1);
	TextDrawSetShadow(StatusShow[playerid],1);

	Speed2Show[playerid] = TextDrawCreate(502.000000,390.000000, "_");
	TextDrawBackgroundColor(Speed2Show[playerid], COLOR_BLACK);
	TextDrawLetterSize(Speed2Show[playerid],0.239999,1.010000);
	TextDrawFont(Speed2Show[playerid], 2);
	TextDrawColor(Speed2Show[playerid], COLOR_WHITE);
	TextDrawSetOutline(Speed2Show[playerid], 1);
	TextDrawSetProportional(Speed2Show[playerid],1);
	TextDrawSetShadow(Speed2Show[playerid],1);

	EngineShow[playerid] = TextDrawCreate(592.000000,390.000000, "_");
	TextDrawBackgroundColor(EngineShow[playerid], COLOR_BLACK);
	TextDrawLetterSize(EngineShow[playerid],0.259999,1.010000);
	TextDrawFont(EngineShow[playerid], 2);
	TextDrawColor(EngineShow[playerid], COLOR_WHITE);
	TextDrawSetOutline(EngineShow[playerid], 1);
	TextDrawSetProportional(EngineShow[playerid],1);
	TextDrawSetShadow(EngineShow[playerid],1);
в
PHP:
public OnPlayerStateChange(playerid, newstate, oldstate)
после
PHP:
TextDrawHideForPlayer(playerid,Speed);
вставляем:
PHP:
TextDrawHideForPlayer(playerid,Speed1);
и ищем строчку
PHP:
TextDrawShowForPlayer(playerid,Speed);
и после нее ставим:

PHP:
TextDrawShowForPlayer(playerid,Speed1);


Вот что у нас получилось:


Автор редактирования: Я
Автор идеи: Mystic Role Play ;3


---------- Post added at 22:55 ---------- Previous post was at 22:54 ----------

P.s. Модераторы добавьте префикс "Мануал"
 
Последнее редактирование модератором:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу