Wiki - IV:Multiplayer

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Wiki - IV:Multiplayer » Готовые моды/скрипты » Готовый спидометр by Coflan


Готовый спидометр by Coflan

Сообщений 1 страница 2 из 2

1

В самый верх мода:

Код:
local vehicleNames =//Названия автомобилей
[
	"Lincoln Town Car", "Airtug", "Chevrolet Van Ambulance", "Dodge Viper GTS", "Ford F650", "Mack Pinnacle", "Honda CR-X", "Ford F150", "Chevrolet Step Van",
	"Oldsmobile Calais", "Chevrolet Express", "Chevrolet Express", "Bus", "Chrysler Town in Country", "Cadillac Escalade", "Subaru Legacy", "Maybach 62", "Porsche 911",
	"Chevrolet Corvette C5", "BMW 6", "Toyota Prius", "Dodge Charger 1968", "JMC Baodian", "Cadillac Fleetwood", "Cadillac Fleetwood", "Cadillac Eldorado", "Buick Grand National 1987",
	"Dodge Charger", "Mercedes SLC", "Infiniti I30", "Infiniti I30", "American LaFrance EFP", "Peterbilt 377", "Peugeot 605", "Forklift", "Toyota Corolla AE86", "Ford F-350",
	"Lexus RX", "Toyota Сorona", "Range Rover Sport", "Lamborghini Diablo", "Ingot", "Lexus GS", "Land Rover", "BMW 5", "Cadillac Eldorado",
	"Lincoln Continental", "Honda Accord", "Ford Windstar", "Chevrolet Astro Van", "Chevrolet Step Van", "Isuzu NLR85", "Hummer H2", "International Navistar", "BMW 7",
	"Kenworth K100", "Hummer H2", "Honda Odyssey", "Honda Odyssey", "Lincoln Premiere", "Peterbilt 389", "Infiniti G35", "Chrysler 300", "Chevrolet Impala",
	"Chevrolet Impala", "Hummer H2", "Chevrolet Chevy Van", "Toyota Corola", "Hongqi HQ3", "Cadillac CTS", "International Navistar", "Ford Bronco", "Volkswagen Golf+",
	"Schopf F106", "Licoln Town Car", "Chrysler New Yorker Landau", "Chevrolet Camaro", "Chevrolet Chevelle SS", "Chevrolet Chevelle SS", "Ford Gran Torino Sport", "Mercedes E-Class", "BMW 3", "Solair",
	"Chevrolet Van", "Pontiac GTO", "Volswagen Crafter", "International Navistar", "Citroen Xantia", "Lincoln Town Car", "Subaru WRX", "Subaru WRX", "Aston Martin",
	"Ford Crown Victoria", "Chevrolet Impala", "McNeilus Standard", "Ferrari F430", "Ford Escort", "Chevrolet Camaro 1968", "Chevrolet Camaro 1968", "Mitsubishi Galant", "Buick Riviera", "Chevrolet Impala",
	"Lincoln Town L", "Buick LeSabre", "Yankee", "Bobber", "Piaggio BV 250", "Hellfury", "Kawasaki Ninja 500", "Ducati Monster", "Stels Trigger 50",
	"Triumph Chopper", "AH-64 Apache", "Bell 430", "Bell 430 Police", "Bell 412", "Dinghy", "Flint 520", "Feeling 30", "Silver Eagle 650",
	"Integrity 346", "Sea Magic 21 Sport", "Tug", "Sea-doo Speedster 200", "Cablecar", "Subway Lo", "Subway Hi"
];

В onScriptInit:

Код:
	timer(Speedometr,1000,-1);//сделам 1 секунду,  чтобы сильно не нагружать серв

Собственно, сам спидометр:

Код:
function Speedometr()
{
	for(local i = 0; i < MAX_PLAYERS; ++i)
    {
        if(!isPlayerConnected(i)) continue;
        if(!isPlayerInAnyVehicle(i)) continue;
        local vehicleid = getPlayerVehicleId(i);
    local name = getVehicleModel(vehicleid);
    local velo = getVehicleVelocity(vehicleid);
    local health = getVehicleHealth(vehicleid);
    local speed = sqrt(pow(velo[0], 2) + pow(velo[1], 2) + pow(velo[2], 2))*5;
    displayPlayerInfoText(i, "~b~"+ vehicleNames[name]+"~n~~w~Speed: ~b~"+speed.tointeger()+"~n~~g~by~r~ Coflan", 1100);
	}
	return 1;
}

Скрин:
https://forumstatic.ru/files/0014/88/36/39760.png

0

2

Скрин прикрепи

0


Вы здесь » Wiki - IV:Multiplayer » Готовые моды/скрипты » Готовый спидометр by Coflan


Рейтинг форумов | Создать форум бесплатно