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

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

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

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

Мануал Информация о машине All TextDraw

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

Dominic94

Ученик
Всем привет. Делать было нечего и решил написать то чего нету в паблике, возможно и есть может не заметил. Возможно кому нибуть пригодится.
Автор системы: я т.е Ayzek_Clark
Скриншот:
Описание системы: Когда вы садитесь в машину выходит TextDraw с боку и показывает картинку машины, название машины и максимальную скорость машины.
И так начнём ко всем new:
PHP:
new PlayerText:CarDraw[6][MAX_PLAYERS];
new Text:CarDrawModel;
PHP:
new VehicleMaxSpeed[][] = {
 {140},
 {131},
 {166},
 {98},
 {118},
 {146},
 {98},
 {132},
 {89},
 {140},
 {115},
 {197},
 {150},
 {98},
 {94},
 {171},
 {137},
 {399},
 {103},
 {133},
 {129},
 {137},
 {124},
 {88},
 {120},
 {399},
 {154},
 {147},
 {139},
 {179},
 {399},
 {116},
 {84},
 {98},
 {148},
 {0},
 {133},
 {140},
 {127},
 {150},
 {121},
 {67},
 {124},
 {12},
 {98},
 {146},
 {399},
 {399},
 {162},
 {399},
 {399},
 {172},
 {399},
 {399},
 {399},
 {140},
 {94},
 {84},
 {140},
 {121},
 {399},
 {180},
 {155},
 {180},
 {399},
 {399},
 {131},
 {125},
 {164},
 {399},
 {139},
 {98},
 {399},
 {399},
 {133},
 {154},
 {399},
 {166},
 {105},
 {124},
 {164},
 {86},
 {139},
 {109},
 {399},
 {88},
 {56},
 {399},
 {399},
 {124},
 {139},
 {132},
 {125},
 {399},
 {191},
 {157},
 {145},
 {399},
 {96},
 {109},
 {125},
 {399},
 {191},
 {191},
 { 154},
 {124},
 {159},
 {148},
 {96},
 {93},
 {117},
 {399},
 {399},
 {399},
 {107},
 {126},
 {140},
 {140},
 {146},
 {399},
 {399},
 {190},
 {200},
 {172},
 {116},
 {143},
 {140},
 {133},
 {157},
 {133},
 {54},
 {62},
 {98},
 {148},
 {150},
 {140},
 {154},
 {399},
 {399},
 {89},
 {136},
 {180},
 {146},
 {134},
 {132},
 {131},
 {133},
 {127},
 {399},
 {136},
 {128},
 {140},
 {108},
 {399},
 {128},
 {141},
 {98},
 {98},
 {139},
 {158},
 {150},
 {137},
 {158},
 {399},
 {79},
 {146},
 {142},
 {154},
 {130},
 {399},
 {399},
 {83},
 {54},
 {98},
 {53},
 {140},
 {140},
 {399},
 {116},
 {140},
 {136},
 {170},
 {121},
 {76},
 {399},
 {136},
 {175},
 {147},
 {96},
 {145},
 {399},
 {399},
 {399},
 {399},
 {54},
 {399},
 {156},
 {156},
 {156},
 {140},
 {134},
 {98},
 {150},
 {152},
 {131},
 {134},
 {399},
 {399},
 {399},
 {96},
 {399},
 {399}
};
Кто не понял VehicleMaxSpeed объясняю, здесь у нас скорость машины которая будет указан в Textdraw
PHP:
new VehicleNames[212][] = {
	"Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
	"Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
	"Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
	"Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
	"Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
	"Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",
	"Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
	"Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring A","Hotring B",
	"Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain",
	"Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",
	"Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",
	"Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",
	"Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",
	"Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor",
	"Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car","Police Car",
	"Police Car","Police Ranger","Picador","S.W.A.T.","Alpha","Phoenix","Glendale","Sadler","L Trailer A","L Trailer B",
	"Stair Trailer","Boxville","Farm Plow","U Trailer" };
Далее в public OnPlayerStateChange
PHP:
if(newstate == PLAYER_STATE_DRIVER)
	{
		PlayerTextDrawShow(playerid, CarDraw[0][playerid]);
        PlayerTextDrawShow(playerid, CarDraw[1][playerid]);
        PlayerTextDrawShow(playerid, CarDraw[2][playerid]);
		PlayerTextDrawShow(playerid, CarDraw[3][playerid]);
		PlayerTextDrawShow(playerid, CarDraw[4][playerid]);
		PlayerTextDrawShow(playerid, CarDraw[5][playerid]);
		format(strings, sizeof(strings), "%s", VehicleNames[GetVehicleModel(caridi)-400]);
		PlayerTextDrawSetString(playerid, CarDraw[5][playerid],strings);
		format(string1, sizeof(string1), "%d", VehicleMaxSpeed[GetVehicleModel(caridi)-400]);
		PlayerTextDrawSetString(playerid, CarDraw[4][playerid],string1);
		TextDrawSetPreviewModel(CarDrawModel,GetVehicleModel(caridi));
        TextDrawShowForPlayer(playerid, CarDrawModel);
        SetTimerEx("Carsinfodraw",7000,false,"i", playerid);
	}
Далее создаём новый public
PHP:
forward Carsinfodraw(playerid);
public Carsinfodraw(playerid)
{
	PlayerTextDrawHide(playerid, CarDraw[0][playerid]);
	PlayerTextDrawHide(playerid, CarDraw[1][playerid]);
	PlayerTextDrawHide(playerid, CarDraw[2][playerid]);
	PlayerTextDrawHide(playerid, CarDraw[3][playerid]);
	PlayerTextDrawHide(playerid, CarDraw[4][playerid]);
	PlayerTextDrawHide(playerid, CarDraw[5][playerid]);
	TextDrawHideForPlayer(playerid, CarDrawModel);
	return 1;
}
Далее в public onplayerconnect
PHP:
CarDrawModel = TextDrawCreate(493.800048, 150.506576, "");
	TextDrawFont(CarDrawModel, TEXT_DRAW_FONT_MODEL_PREVIEW);
	TextDrawColor(CarDrawModel, 0xffffffff);
	TextDrawBackgroundColor(CarDrawModel, 0xffffff00);
	TextDrawTextSize(CarDrawModel, 160, 160);
	TextDrawSetPreviewRot(CarDrawModel, -10.0, 0.0, -20.0, 1.0);

           CarDraw[0][playerid] = CreatePlayerTextDraw(playerid, 627.600097, 189.659988, "usebox");
	PlayerTextDrawLetterSize(playerid, CarDraw[0][playerid], 0.000000, 17.235931);
	PlayerTextDrawTextSize(playerid, CarDraw[0][playerid], 503.600006, 0.000000);
	PlayerTextDrawAlignment(playerid, CarDraw[0][playerid], 1);
	PlayerTextDrawColor(playerid, CarDraw[0][playerid], 0);
	PlayerTextDrawUseBox(playerid, CarDraw[0][playerid], true);
	PlayerTextDrawBoxColor(playerid, CarDraw[0][playerid], 102);
	PlayerTextDrawSetShadow(playerid, CarDraw[0][playerid], 0);
	PlayerTextDrawSetOutline(playerid, CarDraw[0][playerid], 0);
	PlayerTextDrawFont(playerid, CarDraw[0][playerid], 0);

	CarDraw[1][playerid] = CreatePlayerTextDraw(playerid, 508.000000, 292.693328, "LD_SPAC:white");
	PlayerTextDrawLetterSize(playerid, CarDraw[1][playerid], 0.000000, 0.000000);
	PlayerTextDrawTextSize(playerid,CarDraw[1][playerid], 115.200012, 5.973358);
	PlayerTextDrawAlignment(playerid, CarDraw[1][playerid], 1);
	PlayerTextDrawColor(playerid, CarDraw[1][playerid], -1);
	PlayerTextDrawSetShadow(playerid, CarDraw[1][playerid], 0);
	PlayerTextDrawSetOutline(playerid, CarDraw[1][playerid], 0);
	PlayerTextDrawFont(playerid, CarDraw[1][playerid], 4);

	CarDraw[2][playerid] = CreatePlayerTextDraw(playerid, 510.400024, 303.893310, "Maxspeed:");
	PlayerTextDrawLetterSize(playerid, CarDraw[2][playerid], 0.279999, 1.300000);
	PlayerTextDrawAlignment(playerid, CarDraw[2][playerid], 1);
	PlayerTextDrawColor(playerid, CarDraw[2][playerid], -1);
	PlayerTextDrawSetShadow(playerid, CarDraw[2][playerid], 0);
	PlayerTextDrawSetOutline(playerid, CarDraw[2][playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, CarDraw[2][playerid], 51);
	PlayerTextDrawFont(playerid, CarDraw[2][playerid], 1);
	PlayerTextDrawSetProportional(playerid, CarDraw[2][playerid], 1);

	CarDraw[3][playerid] = CreatePlayerTextDraw(playerid, 509.600006, 327.786621, "Model:");
	PlayerTextDrawLetterSize(playerid, CarDraw[3][playerid], 0.279999, 1.300000);
	PlayerTextDrawAlignment(playerid, CarDraw[3][playerid], 1);
	PlayerTextDrawColor(playerid, CarDraw[3][playerid], -1);
	PlayerTextDrawSetShadow(playerid, CarDraw[3][playerid], 0);
	PlayerTextDrawSetOutline(playerid, CarDraw[3][playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, CarDraw[3][playerid], 51);
	PlayerTextDrawFont(playerid, CarDraw[3][playerid], 1);
	PlayerTextDrawSetProportional(playerid, CarDraw[3][playerid], 1);

	CarDraw[4][playerid] = CreatePlayerTextDraw(playerid, 567.900048, 304.639953, "_");
	PlayerTextDrawLetterSize(playerid, CarDraw[4][playerid], 0.279999, 1.300000);
	PlayerTextDrawAlignment(playerid, CarDraw[4][playerid], 1);
	PlayerTextDrawColor(playerid, CarDraw[4][playerid], 0x10F441AA);
	PlayerTextDrawSetShadow(playerid, CarDraw[4][playerid], 0);
	PlayerTextDrawSetOutline(playerid, CarDraw[4][playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, CarDraw[4][playerid], 51);
	PlayerTextDrawFont(playerid, CarDraw[4][playerid], 1);
	PlayerTextDrawSetProportional(playerid, CarDraw[4][playerid], 1);

	CarDraw[5][playerid] = CreatePlayerTextDraw(playerid, 547.600097, 327.786590, "_");
	PlayerTextDrawLetterSize(playerid, CarDraw[5][playerid], 0.279999, 1.300000);
	PlayerTextDrawAlignment(playerid, CarDraw[5][playerid], 1);
	PlayerTextDrawColor(playerid, CarDraw[5][playerid], 0x10F441AA);
	PlayerTextDrawSetShadow(playerid, CarDraw[5][playerid], 0);
	PlayerTextDrawSetOutline(playerid, CarDraw[5][playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, CarDraw[5][playerid], 51);
	PlayerTextDrawFont(playerid, CarDraw[5][playerid], 1);
	PlayerTextDrawSetProportional(playerid, CarDraw[5][playerid], 1);
Ну вот и всё, таймер можете использовать как хотите, я сделал побыстрому чтоб всем подходила эта система. Спасибо за просмотр удачи.​
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу