Criminal-Staff

ОТкрытие?*
 

Ну, заходи, гостем будешь! Если ты читаешь этот текст, значит тебе пора зарегистрироваться. Жми эту надпись, чтобы зарегистрироваться и начать полноценно пользоваться нашим форумом!
Последние темы
» Rifa Gang ■ Курилка (тема для свободного общения) ■
Спидометр для мода Emptyавтор Stiven_Winston Вс 21 Авг - 20:12

» || ООО "Дизайн" || Ценовая политика ||
Спидометр для мода Emptyавтор Talgat Вт 16 Авг - 0:39

» || ООО "Дизайн" || Рабочий график ||
Спидометр для мода Emptyавтор Talgat Пн 15 Авг - 22:36

» || ООО "Дизайн" || Сотрудники Гос. Организации ||
Спидометр для мода Emptyавтор Talgat Пн 15 Авг - 19:56

» Заявление на пост лидера Организации/Банды/Мафии
Спидометр для мода Emptyавтор Talgat Пн 15 Авг - 16:58


Поделиться
 

 Спидометр для мода

Предыдущая тема Следующая тема Перейти вниз 
АвторСообщение
Sergey_Petruk

Sergey_Petruk


Репутация : 1
Ник на сервере: : Sergey_Petruk
Фракция/Банда: : ★The★Ballas★Gang★
Дата регистрации : 2013-11-16
Сообщения : 2

Спидометр для мода Empty
СообщениеТема: Спидометр для мода   Спидометр для мода EmptyВс 8 Дек - 15:13

К всему new:
Код:
//Спидометр
new Text:TextBox;
new Text:TextSpeed;
new PlayerText:Speedometr[18][MAX_PLAYERS];
new PlayerText:TextKmPlayer[MAX_PLAYERS];
new PlayerText:TextFuelPlayer[MAX_PLAYERS];
new PlayerText:TextNamePlayer[MAX_PLAYERS];
new PlayerText:TextDoorPlayer[MAX_PLAYERS];
new PlayerText:TextModel[MAX_PLAYERS];
new Text:TextKvadr[4];
new Text:TextFuel;
new Text:TextName;
new Text:TextDoor;
new SpeedTimer[MAX_PLAYERS];
new bool:     SpeedGo[MAX_PLAYERS];
//  
В OnGameModeInit
Код:
//Ñïèäîìåòð
    TextBox = TextDrawCreate(549.000000, 360.000000, "-");
    TextDrawBackgroundColor(TextBox, 255);
    TextDrawFont(TextBox, 1);
    TextDrawLetterSize(TextBox, 0.000000, 5.599998);
    TextDrawColor(TextBox, -1);
    TextDrawSetOutline(TextBox, 0);
    TextDrawSetProportional(TextBox, 1);
    TextDrawSetShadow(TextBox, 1);
    TextDrawUseBox(TextBox, 1);
    TextDrawBoxColor(TextBox, 85);
    TextDrawTextSize(TextBox, 383.000000, 0.000000);

    TextSpeed = TextDrawCreate(390.000000, 397.000000, "Speed:");
    TextDrawBackgroundColor(TextSpeed, 255);
    TextDrawFont(TextSpeed, 2);
    TextDrawLetterSize(TextSpeed, 0.219999, 1.399999);
    TextDrawColor(TextSpeed, -1448891649);
    TextDrawSetOutline(TextSpeed, 0);
    TextDrawSetProportional(TextSpeed, 1);
    TextDrawSetShadow(TextSpeed, 1);

    TextKvadr[0] = TextDrawCreate(462.000000, 361.000000, "-");
    TextDrawBackgroundColor(TextKvadr[0], 255);
    TextDrawFont(TextKvadr[0], 1);
    TextDrawLetterSize(TextKvadr[0], 0.000000, 3.299998);
    TextDrawColor(TextKvadr[0], -1);
    TextDrawSetOutline(TextKvadr[0], 0);
    TextDrawSetProportional(TextKvadr[0], 1);
    TextDrawSetShadow(TextKvadr[0], 1);
    TextDrawUseBox(TextKvadr[0], 1);
    TextDrawBoxColor(TextKvadr[0], 85);
    TextDrawTextSize(TextKvadr[0], 427.000000, 0.000000);

    TextKvadr[1] = TextDrawCreate(502.000000, 361.000000, "-");
    TextDrawBackgroundColor(TextKvadr[1], 255);
    TextDrawFont(TextKvadr[1], 1);
    TextDrawLetterSize(TextKvadr[1], 0.000000, 3.299998);
    TextDrawColor(TextKvadr[1], -1);
    TextDrawSetOutline(TextKvadr[1], 0);
    TextDrawSetProportional(TextKvadr[1], 1);
    TextDrawSetShadow(TextKvadr[1], 1);
    TextDrawUseBox(TextKvadr[1], 1);
    TextDrawBoxColor(TextKvadr[1], 85);
    TextDrawTextSize(TextKvadr[1], 467.000000, 0.000000);

    TextKvadr[2] = TextDrawCreate(545.000000, 361.000000, "-");
    TextDrawBackgroundColor(TextKvadr[2] , 255);
    TextDrawFont(TextKvadr[2] , 1);
    TextDrawLetterSize(TextKvadr[2] , 0.000000, 3.299998);
    TextDrawColor(TextKvadr[2] , -1);
    TextDrawSetOutline(TextKvadr[2] , 0);
    TextDrawSetProportional(TextKvadr[2] , 1);
    TextDrawSetShadow(TextKvadr[2] , 1);
    TextDrawUseBox(TextKvadr[2] , 1);
    TextDrawBoxColor(TextKvadr[2] , 85);
    TextDrawTextSize(TextKvadr[2] , 509.000000, 0.000000);

    TextKvadr[3] = TextDrawCreate(421.000000, 361.000000, "-");
    TextDrawBackgroundColor(TextKvadr[3], 255);
    TextDrawFont(TextKvadr[3], 1);
    TextDrawLetterSize(TextKvadr[3], 0.000000, 3.299998);
    TextDrawColor(TextKvadr[3], -1);
    TextDrawSetOutline(TextKvadr[3], 0);
    TextDrawSetProportional(TextKvadr[3], 1);
    TextDrawSetShadow(TextKvadr[3], 1);
    TextDrawUseBox(TextKvadr[3], 1);
    TextDrawBoxColor(TextKvadr[3], 85);
    TextDrawTextSize(TextKvadr[3], 387.000000, 0.000000);

    TextFuel = TextDrawCreate(434.000000, 358.000000, "FUEL");
    TextDrawBackgroundColor(TextFuel, 255);
    TextDrawFont(TextFuel, 2);
    TextDrawLetterSize(TextFuel, 0.219999, 1.399999);
    TextDrawColor(TextFuel, -1448891649);
    TextDrawSetOutline(TextFuel, 0);
    TextDrawSetProportional(TextFuel, 1);
    TextDrawSetShadow(TextFuel, 1);

    TextName = TextDrawCreate(473.000000, 358.000000, "CAR");
    TextDrawBackgroundColor(TextName, 255);
    TextDrawFont(TextName, 2);
    TextDrawLetterSize(TextName, 0.219999, 1.399999);
    TextDrawColor(TextName, -1448891649);
    TextDrawSetOutline(TextName, 0);
    TextDrawSetProportional(TextName, 1);
    TextDrawSetShadow(TextName, 1);

    TextDoor = TextDrawCreate(515.000000, 358.000000, "DOOR");
    TextDrawBackgroundColor(TextDoor, 255);
    TextDrawFont(TextDoor, 2);
    TextDrawLetterSize(TextDoor, 0.219999, 1.399999);
    TextDrawColor(TextDoor, -1448891649);
    TextDrawSetOutline(TextDoor, 0);
    TextDrawSetProportional(TextDoor, 1);
    TextDrawSetShadow(TextDoor, 1);
В OnPlayerDisconnect
Код:
KillTimer(SpeedTimer[playerid]);    
SpeedGo[playerid] = false;
TextDrawHideForPlayer(playerid,TextBox);
    TextDrawHideForPlayer(playerid,TextSpeed);
    PlayerTextDrawHide(playerid,TextKmPlayer[playerid]);
    PlayerTextDrawHide(playerid,TextFuelPlayer[playerid]);
    PlayerTextDrawHide(playerid,TextNamePlayer[playerid]);
    PlayerTextDrawHide(playerid,TextDoorPlayer[playerid]);
    PlayerTextDrawHide(playerid,TextModel[playerid]);
    TextDrawHideForPlayer(playerid,TextFuel);
    TextDrawHideForPlayer(playerid,TextName);
    TextDrawHideForPlayer(playerid,TextDoor);
В public OnPlayerStateChange
Код:
if(Vehicle[vehicle][Engine] == false)
            {
                SCM(playerid, 0x136807FF, "Нажмите клавишу {ffffff}'2'{136807} чтобы");
            }
            SpeedGo[playerid] = true;
            SpeedTimer[playerid] = SetTimerEx("UpdateSpeedometr", 200, 1, "d", playerid);
            PlayerTextDrawSetPreviewModel(playerid, TextModel[playerid], GetVehicleModel(vehicle));
            PlayerTextDrawSetPreviewVehCol(playerid,TextModel[playerid]);
            PlayerTextDrawShow(playerid,TextModel[playerid]);
        }
    }
    else if(newstate == PLAYER_STATE_ONFOOT)//Ïåøêîì
    {
        SpeedGo[playerid] = false;
        KillTimer(SpeedTimer[playerid]);
        for(new i; i < 18; i++)
        {
            if(i < 4) { TextDrawHideForPlayer(playerid,TextKvadr[i]); }
            PlayerTextDrawHide(playerid,Speedometr[i][playerid] );
        }
        TextDrawHideForPlayer(playerid,TextBox);
        TextDrawHideForPlayer(playerid,TextSpeed);
        PlayerTextDrawHide(playerid,TextKmPlayer[playerid]);
        PlayerTextDrawHide(playerid,TextFuelPlayer[playerid]);
        PlayerTextDrawHide(playerid,TextNamePlayer[playerid]);
        PlayerTextDrawHide(playerid,TextDoorPlayer[playerid]);
        PlayerTextDrawHide(playerid,TextModel[playerid]);
        TextDrawHideForPlayer(playerid,TextFuel);
        TextDrawHideForPlayer(playerid,TextName);
        TextDrawHideForPlayer(playerid,TextDoor);
    }
    return 1;
}  
В любое место:
Код:
forward UpdateSpeedometr(playerid);
public UpdateSpeedometr(playerid)
{
    if(SpeedGo[playerid] == true)
    {
        new string[50],door[32],engine[32];
        for(new i; i < 18; i++)
        {
            if(i < 4) { TextDrawShowForPlayer(playerid,TextKvadr[i]); }
            PlayerTextDrawShow(playerid,Speedometr[i][playerid] );
        }
        TextDrawShowForPlayer(playerid,TextBox);
        TextDrawShowForPlayer(playerid,TextSpeed);
        PlayerTextDrawShow(playerid,TextKmPlayer[playerid]);
        PlayerTextDrawShow(playerid,TextFuelPlayer[playerid]);
        PlayerTextDrawShow(playerid,TextNamePlayer[playerid]);
        PlayerTextDrawShow(playerid,TextDoorPlayer[playerid]);
        TextDrawShowForPlayer(playerid,TextFuel);
        TextDrawShowForPlayer(playerid,TextName);
        TextDrawShowForPlayer(playerid,TextDoor);
        format(string,sizeof(string),"%i km/h",SpeedVehicle(playerid));
        PlayerTextDrawSetString(playerid,TextKmPlayer[playerid],string);
        if(SpeedVehicle(playerid) > 10) PlayerTextDrawBoxColor(playerid,Speedometr[0][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[0][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 20) PlayerTextDrawBoxColor(playerid,Speedometr[1][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[1][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 30) PlayerTextDrawBoxColor(playerid,Speedometr[2][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[2][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 40) PlayerTextDrawBoxColor(playerid,Speedometr[3][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[3][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 50) PlayerTextDrawBoxColor(playerid,Speedometr[4][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[4][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 60) PlayerTextDrawBoxColor(playerid,Speedometr[5][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[5][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 70) PlayerTextDrawBoxColor(playerid,Speedometr[6][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[6][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 80) PlayerTextDrawBoxColor(playerid,Speedometr[7][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[7][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 90) PlayerTextDrawBoxColor(playerid,Speedometr[8][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[8][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 100) PlayerTextDrawBoxColor(playerid,Speedometr[9][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[9][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 110) PlayerTextDrawBoxColor(playerid,Speedometr[10][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[10][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 120) PlayerTextDrawBoxColor(playerid,Speedometr[11][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[11][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 130) PlayerTextDrawBoxColor(playerid,Speedometr[12][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[12][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 140) PlayerTextDrawBoxColor(playerid,Speedometr[13][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[13][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 150) PlayerTextDrawBoxColor(playerid,Speedometr[14][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[14][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 160) PlayerTextDrawBoxColor(playerid,Speedometr[15][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[15][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 170) PlayerTextDrawBoxColor(playerid,Speedometr[16][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[16][playerid], -2139062119);
        if(SpeedVehicle(playerid) > 180) PlayerTextDrawBoxColor(playerid,Speedometr[17][playerid],292552959);
        else PlayerTextDrawBoxColor(playerid,Speedometr[17][playerid], -2139062119);
        format(string,sizeof(string),"%i",Vehicle[vehicle][Fuel]);
        PlayerTextDrawSetString(playerid,TextFuelPlayer[playerid],string);
        if(Vehicle[vehicle][CarLock] == false) door = "UNLOCK";
        else door = "LOCK";
        format(string,sizeof(string),"%s",door);
        PlayerTextDrawSetString(playerid,TextDoorPlayer[playerid],string);
        if(Vehicle[vehicle][Engine] == false) engine = "OFF";
        else engine = "ON";
        format(string,sizeof(string),"%s",engine);
        PlayerTextDrawSetString(playerid,TextNamePlayer[playerid],string);
    }
    return true;
}
stock SpeedVehicle(playerid)
{
    new Float:ST[4];
    if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(vehicle,ST[0],ST[1],ST[2]);
    else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
    return floatround(floatsqroot(ST[0]*ST[0]+ST[1]*ST[1]+ST[2]*ST[2])*120);
}[/i]
Вот что у нас выйдет
Спидометр для мода CH5rI1bvOaw
Автор:Sergo
Автор вырезки:Я
Вернуться к началу Перейти вниз
Nazik

avatar


Репутация : 17
Ник на сервере: : Nazik_Nofam
Фракция/Банда: : Репортёры
Дата регистрации : 2013-10-30
Возраст : 25
Сообщения : 3
Откуда : Украина
Зодиак : Весы

Спидометр для мода Empty
СообщениеТема: Re: Спидометр для мода   Спидометр для мода EmptyВс 8 Дек - 15:35

норм так,но не нужно всего)
Вернуться к началу Перейти вниз
Sergey_Petruk

Sergey_Petruk


Репутация : 1
Ник на сервере: : Sergey_Petruk
Фракция/Банда: : ★The★Ballas★Gang★
Дата регистрации : 2013-11-16
Сообщения : 2

Спидометр для мода Empty
СообщениеТема: Re: Спидометр для мода   Спидометр для мода EmptyВс 8 Дек - 16:13

Ко всем new:
Код:
new Text:ModelShow[MAX_PLAYERS];
new Text:SpeedShow[MAX_PLAYERS];
new Text:HealthShow[MAX_PLAYERS];
new Text:FuelShow[MAX_PLAYERS];
new Text:StatusShow[MAX_PLAYERS];
new Text:EngineShow[MAX_PLAYERS];
new PlayerText:privcar[MAX_PLAYERS];
new    SpeedoTimer;
new str1[64],str2[64],str3[64],str4[64],str5[64],str6[64];
Ко всем forward'am:
Код:
forward UpdateSpeedometr();
В OnGameModeInit:
Код:
SpeedoTimer = SetTimer("UpdateSpeedometr", 120, true);// Обновление спидометра
В GameModeExit:
Код:
KillTimer(SpeedoTimer);
Ко всем stock'am:
Код:
stock IsAPlane(carid){switch(GetVehicleModel(carid)){case 592,577,511,512,593,520,553,476,519,460,513,548,417,487,488,497,563,447,469:return true;}return false;}
stock IsANoSpeed(carid){switch(GetVehicleModel(carid)){case 441,448,449,450,462,464,465,481,501,509,510,537,538,564,569,570,590,591,594,606,607,608,610,611:return true;}return false;}
В OnPlayerConnect:
Код:
ModelShow[playerid] = TextDrawCreate(520.000000, 360.000000, "_");
    TextDrawBackgroundColor(ModelShow[playerid], COLOR_BLACK);
    TextDrawLetterSize(ModelShow[playerid],0.259999,1.010000);
    TextDrawFont(ModelShow[playerid], 2);
    TextDrawColor(ModelShow[playerid], COLOR_WHITE);
    TextDrawSetOutline(ModelShow[playerid], 1);
    TextDrawSetProportional(ModelShow[playerid],1);
    TextDrawSetShadow(ModelShow[playerid],1);

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

    privcar[playerid] = CreatePlayerTextDraw(playerid, 525.000000, 280.000000, "_");
    PlayerTextDrawFont(playerid, privcar[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
    PlayerTextDrawUseBox(playerid, privcar[playerid], 0);
    PlayerTextDrawTextSize(playerid, privcar[playerid], 105.0, 100.0);
    PlayerTextDrawSetPreviewModel(playerid, privcar[playerid], 411);
    PlayerTextDrawSetPreviewRot(playerid, privcar[playerid], -10.0, 0.0, -20.0,0.8);
    PlayerTextDrawBackgroundColor(playerid, privcar[playerid], 0xFFFFFF00);

    SpeedShow[playerid] = TextDrawCreate(520.000000, 370.000000,"~g~SPEED: ~w~0km/h");
    TextDrawBackgroundColor(SpeedShow[playerid],COLOR_BLACK);
    TextDrawLetterSize(SpeedShow[playerid],0.259999,1.010000);
    TextDrawFont(SpeedShow[playerid],2);
    TextDrawColor(SpeedShow[playerid],COLOR_WHITE);
    TextDrawSetOutline(SpeedShow[playerid],1);
    TextDrawSetProportional(SpeedShow[playerid],1);
    TextDrawSetShadow(SpeedShow[playerid],1);

    HealthShow[playerid] = TextDrawCreate(520.000000, 390.000000,"0%");
    TextDrawBackgroundColor(HealthShow[playerid],COLOR_BLACK);
    TextDrawLetterSize(HealthShow[playerid],0.259999,1.010000);
    TextDrawFont(HealthShow[playerid],2);
    TextDrawColor(HealthShow[playerid],COLOR_WHITE);
    TextDrawSetOutline(HealthShow[playerid],1);
    TextDrawSetProportional(HealthShow[playerid],1);
    TextDrawSetShadow(HealthShow[playerid],1);

    StatusShow[playerid] = TextDrawCreate(520.000000, 400.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);

    EngineShow[playerid] = TextDrawCreate(520.000000, 410.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);
В OnPlayerStateChange:
Код:
new tacha = GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(PlayerRacing[playerid] == 0)
        {
            if(!IsAPlane(tacha) && !IsABoat(tacha) && !IsANoSpeed(tacha))
            {
                  TextDrawShowForPlayer(playerid,ModelShow[playerid]);
                  TextDrawShowForPlayer(playerid,SpeedShow[playerid]);
                  TextDrawShowForPlayer(playerid,HealthShow[playerid]);
                  TextDrawShowForPlayer(playerid,FuelShow[playerid]);
                  TextDrawShowForPlayer(playerid,StatusShow[playerid]);
                  TextDrawShowForPlayer(playerid,EngineShow[playerid]);
                  PlayerTextDrawSetPreviewModel(playerid,privcar[playerid], GetVehicleModel(tacha));
                PlayerTextDrawShow(playerid,privcar[playerid]);
            }
        }
    }
    else if(newstate == PLAYER_STATE_ONFOOT)
    {
        if(!IsAPlane(tacha) && !IsABoat(tacha) && !IsANoSpeed(tacha))
        {
            TextDrawHideForPlayer(playerid,ModelShow[playerid]);
            TextDrawHideForPlayer(playerid,SpeedShow[playerid]);
            TextDrawHideForPlayer(playerid,HealthShow[playerid]);
            TextDrawHideForPlayer(playerid,FuelShow[playerid]);
            TextDrawHideForPlayer(playerid,StatusShow[playerid]);
            TextDrawHideForPlayer(playerid,EngineShow[playerid]);
            PlayerTextDrawHide(playerid,privcar[playerid]);
        }
    }
К Пабликам:
Код:
public UpdateSpeedometr()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInAnyVehicle(i))
        {
            new string[128];
            new State = GetPlayerState(i);
            new vehicleid = GetPlayerVehicleID(i);
            new locked[32];
            new Float:vehhel, vehh[20], vehs[20], vehe[20];
            if(IsLocked[GetPlayerVehicleID(i)] == 1) locked = "~g~VEHICLE: ~w~LOCK";
            else locked = "~g~VEHICLE: ~w~UNLOCK";
            GetVehicleHealth(GetPlayerVehicleID(i), vehhel);
            if(vehhel <= 500) vehh = "~r~";
            else vehh = "";
            if(Fuell[GetPlayerVehicleID(i)] <= 30) vehs = "~r~";
            else vehs = "";
            if(EngineState[i] == true) vehe = "~g~ENGINE: ~w~ON";
            else vehe = "~g~ENGINE: ~w~OFF";
            format(str1, sizeof(str1),"~g~SPEED: ~w~%d KM/H",SpeedVehicle(i));
            if(vehhel <= 300) format(str3, sizeof(str3),"~g~HEALTH: ~w~%s%.0f%",vehh,vehhel / 10); else format(str3, sizeof(str3),"~g~HEALTH: ~w~%s%.0f%",vehh,vehhel / 10);
            format(str2, sizeof(str2), "%s", locked);
            format(str6, sizeof(str6), "~g~MODEL: ~w~%s", VehicleNames[GetVehicleModel(GetPlayerVehicleID(i))-400]);
            format(str4, sizeof(str4), "~g~FUEL: ~w~%s%.0f", vehs,Fuell[GetPlayerVehicleID(i)]);
            format(str5, sizeof(str5), "%s", vehe);
            if(!IsAPlane(vehicleid) && !IsABoat(vehicleid) && !IsANoSpeed(vehicleid))
            {
                if(SpeedVehicle(i) != 0)
                {
                    Fuell[vehicleid] -= 0.0050;
                }
            }
            TextDrawSetString(FuelShow[i],str4);
            TextDrawSetString(HealthShow[i],str3);
            TextDrawSetString(SpeedShow[i],str1);
            TextDrawSetString(ModelShow[i],str6);
            TextDrawSetString(StatusShow[i],str2);
            TextDrawSetString(EngineShow[i],str5);
        }
    }
}
Вот что у нас выйдет
Спидометр для мода QmGOo
Вернуться к началу Перейти вниз
Nazik

avatar


Репутация : 17
Ник на сервере: : Nazik_Nofam
Фракция/Банда: : Репортёры
Дата регистрации : 2013-10-30
Возраст : 25
Сообщения : 3
Откуда : Украина
Зодиак : Весы

Спидометр для мода Empty
СообщениеТема: Re: Спидометр для мода   Спидометр для мода EmptyВс 8 Дек - 16:38

вот это уже получше)
Вернуться к началу Перейти вниз
Francesco_Sardi

Francesco_Sardi


Репутация : 19
Ник на сервере: : Francesco_Sardi
Фракция/Банда: : †•°La Cosa Nostra°•†
Дата регистрации : 2013-10-25
Возраст : 25
Сообщения : 5
Откуда : Tomsk
Зодиак : Скорпион

Спидометр для мода Empty
СообщениеТема: Re: Спидометр для мода   Спидометр для мода EmptyПн 9 Дек - 18:09

Сразу видно не сам работал. Плюс поставлю.
Вернуться к началу Перейти вниз
 

Спидометр для мода

Предыдущая тема Следующая тема Вернуться к началу 
Страница 1 из 1

Права доступа к этому форуму:Вы не можете отвечать на сообщения
Criminal-Staff :: • Разное :: Ваши скрипты, map-