(FS) Смена цвета авто на TextDraw

Готовые решения скриптов, filterScript

Модератор: SJplayer

Аватара
Автор темы
Miranda F
Старшина
Старшина
Сообщения: 130
Репутация: 11
С нами: 5 лет 5 месяцев

(FS) Смена цвета авто на TextDraw

Сообщение #1 Miranda » 27 марта 2015, 10:13

Находясь в транспорте нажмите кнопку N и появляется TD слева с возможностью выбора цвета авто. Вы можете сменить отображаемые цвета авто в переменной ColorsAvailable. Вводить нужно ID цвета авто, например: 0, 224, 178 ...

Изображение
Sky[L]a[G]er

Код: Выделить всё

/*
       
        Для примера скрипт вполне подойдет
        Смена цвета ТС на  TextDraw`ах
        Автор: Sky[L]a[G]er
 
*/
 
#include <a_samp>
 
new Text
:ChangeColor[37];
new ColorsAvailable[36] = {
        0,1,5,8,10,15,68,48,98,45,73,64,80,250,111,228,235,117,118,50,81,63,119,230,150,30,96,115,36,4,3,11,9,28,99,181
};
 
new AllCarColors
[256] = {
        0x000000FF,0xFFFFFFFF,0x55aaa7FF,0xce575bFF,0x58685dFF,0xb06c77FF,0xf8ad38FF,0x7a96acFF,0xdfdec9FF,0x81897aFF,
        0x677776FF,0x93948eFF,0x7e9689FF,0x807c70FF,0xe8eac3FF,0xbab9a5FF,0x73996aFF,0xa54549FF,0xc55063FF,0xd8d5b2FF,
        0x86979eFF,0xa66b67FF,0x8e4556FF,0xcfc3a9FF,0x6c6d65FF,0x5b5a55FF,0xafb295FF,0x77705eFF,0x5a6466FF,0xa89f82FF,
        0x64433aFF,0x73423dFF,0xb5bcb4FF,0xa1a58aFF,0x96947fFF,0x918a6cFF,0x5a5b53FF,0x5b6656FF,0xa8b186FF,0x8d9389FF,
        0x3f3c35FF,0x80765dFF,0x873b3bFF,0x7d3334FF,0x3b5741FF,0x71413dFF,0xaaa176FF,0x89815dFF,0xc2b894FF,0xd6d0b0FF,
        0xa9a98fFF,0x647d67FF,0x849283FF,0x495261FF,0x565b61FF,0x9d846eFF,0xb0af90FF,0xa19273FF,0x7a3138FF,0x5c6c69FF,
        0x9e9c83FF,0x887554FF,0x803c3dFF,0x928f7cFF,0xcfcda7FF,0xd4d27fFF,0x6f534fFF,0xa7ada1FF,0xe1dd9eFF,0xd9b79bFF,
        0xa84645FF,0x96a097FF,0x6f725dFF,0xb6bd93FF,0x764040FF,0x434842FF,0xb0ac89FF,0xb5a778FF,0x8a473fFF,0x375369FF,
        0x9a555aFF,0xaa9c75FF,0xac5359FF,0x56665bFF,0x786151FF,0x995061FF,0x60843cFF,0x72858bFF,0x7c454aFF,0xa7a373FF,
        0xb8b29aFF,0x585e5cFF,0x827f6eFF,0x388a85FF,0x4b6566FF,0x4c5858FF,0xc3c0a1FF,0x97a79aFF,0x80a999FF,0xe1c99dFF,
        0x6e8c8aFF,0x57585cFF,0xd6b98dFF,0x426d80FF,0xa29368FF,0x818274FF,0x3d717fFF,0xb6ab7eFF,0x587482FF,0x696a62FF,
        0x8f7d59FF,0xa3a091FF,0x80948bFF,0x786954FF,0x72866aFF,0xaa4553FF,0x53616aFF,0x8f4f4fFF,0xbfc1b6FF,0x938369FF,
        0xb5a180FF,0x763b41FF,0x747567FF,0x846c50FF,0x914b4dFF,0x38526bFF,0xef87a2FF,0x3c3d38FF,0x6cb85dFF,0x725a4eFF,
        0x78acaaFF,0x987e59FF,0x9b675aFF,0x545d4cFF,0x706c83FF,0x7dc6bdFF,0xcb90c6FF,0x7fca6fFF,0xf7ebc3FF,0x9697abFF,
        0xc3bda3FF,0xbdaf88FF,0xcdbf67FF,0xab8e90FF,0xa28796FF,0xd2ee99FF,0xbd8a93FF,0xaa6a85FF,0x72715cFF,0x665b45FF,
        0x656952FF,0x7e926fFF,0x7398b5FF,0x7da477FF,0x6bcf79FF,0x65c8a9FF,0xe0d59dFF,0xc8c5b4FF,0xde7c5fFF,0x77694cFF,
        0x5d6d49FF,0xd17f74FF,0x6f93b3FF,0x62b79aFF,0x667264FF,0x6aa998FF,0x6daaa5FF,0xaa7faaFF,0x875e4aFF,0xbfb1b0FF,
        0xb4a8acFF,0x987f9dFF,0x686947FF,0x80604bFF,0x8e6c50FF,0xd8685aFF,0xd294a9FF,0xbf9899FF,0xbb839cFF,0x826168FF,
        0xbd825aFF,0xba6254FF,0xd28865FF,0xcf7958FF,0xc88c84FF,0xbba899FF,0x4f5847FF,0x516b48FF,0x6c825bFF,0x677c5bFF,
        0xaa757dFF,0x8dca85FF,0xd4c7a4FF,0xc0bfaaFF,0xdfd249FF,0xbac775FF,0xbdc2a2FF,0xbabb5eFF,0x717caaFF,0x7d7b4aFF,
        0xc1aa74FF,0x536370FF,0x79936cFF,0x606f6cFF,0x798f8dFF,0x515459FF,0x4d585aFF,0x677a76FF,0x7d99a7FF,0x5d7b7dFF,
        0x6f8b8cFF,0x72668aFF,0xac6c53FF,0xd3caadFF,0x98a053FF,0x545945FF,0xcc996eFF,0xa3caafFF,0xd29779FF,0xcc9054FF,
        0xdd888fFF,0xd6c377FF,0xd07151FF,0x596271FF,0x936556FF,0x89864fFF,0x9cd665FF,0x5a765dFF,0xd0b858FF,0x66b758FF,
        0x83605aFF,0xb79153FF,0xc37d9fFF,0xbf6791FF,0x5b7f51FF,0x71894fFF,0x5d7166FF,0xc3919dFF,0xcca470FF,0xaf6c52FF,
        0x77c4a4FF,0x99c556FF,0x9b616fFF,0x63bd63FF,0x7c5d49FF,0x57694fFF,0x809ea8FF,0x748080FF,0x935d5bFF,0x90575eFF,
        0xaaa184FF,0x7d7e70FF,0x716d62FF,0xc9c3a3FF,0x9b907aFF,0x838786FF
};
 
 
public OnFilterScriptInit
()
{
        ChangeColor[0] = TextDrawCreate(22.474380, 126.416687, "box");
        TextDrawLetterSize(ChangeColor[0], 0.0, 19.894905); TextDrawTextSize(ChangeColor[0], 170.946334, 0.0);
        TextDrawAlignment(ChangeColor[0], 1); TextDrawColor(ChangeColor[0], -1);
        TextDrawUseBox(ChangeColor[0], 1); TextDrawBoxColor(ChangeColor[0], 102);
        TextDrawSetOutline(ChangeColor[0], 0); TextDrawBackgroundColor(ChangeColor[0], 255);
        TextDrawFont(ChangeColor[0], 1); TextDrawSetProportional(ChangeColor[0], 1);
        TextDrawSetShadow(ChangeColor[0], 0);
       
        new Float
:X=25.0,Float:Y=130.0,Float:S=40.0,count = 1;
        for(new i=1; i < sizeof(ChangeColor); i++)
        {
                ChangeColor[i] = TextDrawCreate(X, Y, "box");
                TextDrawBackgroundColor(ChangeColor[i], (AllCarColors[ColorsAvailable[i-1]]));
                TextDrawLetterSize(ChangeColor[0], 0.0, 18.894905);
                TextDrawTextSize(ChangeColor[i], 20.0, 20.0);TextDrawAlignment(ChangeColor[i], 1);
                TextDrawColor(ChangeColor[i], -1);TextDrawUseBox(ChangeColor[i], 1);
                TextDrawBoxColor(ChangeColor[i], 0);TextDrawSetOutline(ChangeColor[i], 0);
                TextDrawFont(ChangeColor[i], 5);TextDrawSetProportional(ChangeColor[i], 1);
                TextDrawSetShadow(ChangeColor[i], 1);TextDrawSetPreviewModel(ChangeColor[i], 19349);
                TextDrawSetPreviewRot(ChangeColor[i], -16.0, 0.0, -180.0, 0.7);TextDrawSetSelectable(ChangeColor[i], 1);
               
                X 
= X + 25;
                S = S + 25;
                count++;
                if(count == 7)
                {
                        Y = Y + 30.0;= 25.0;
                        S = 40.0;count = 1;
                }
        }
}
 
public OnPlayerKeyStateChange
(playerid, newkeys, oldkeys)
{
        if(newkeys==KEY_NO && IsPlayerInAnyVehicle(playerid))
        {
                for(new i; i < sizeof(ChangeColor); i++)
                {
                        TextDrawShowForPlayer(playerid,ChangeColor[i]);
                }
                SelectTextDraw(playerid, 0xFFFFFF66) ;
        }
}
 
public OnPlayerClickTextDraw
(playerid, Text:clickedid)
{
        if (_:clickedid == INVALID_TEXT_DRAW )
        {
                for(new i; i < sizeof(ChangeColor); i++)
                {
                        TextDrawHideForPlayer(playerid,ChangeColor[i]);
                }
        }
        for(new i=1; i < sizeof(ChangeColor); i++)
        {
                if(clickedid == ChangeColor[i])
                {
                        CancelSelectTextDraw(playerid);
                        ChangeVehicleColor(GetPlayerVehicleID(playerid),ColorsAvailable[i-1],ColorsAvailable[i-1]);
                        for(new j; j < sizeof(ChangeColor); j++)
                        {
                                TextDrawHideForPlayer(playerid,ChangeColor[j]);
                        }
                }
        }
        return 1 ;
}

Изображение
Sky[L]a[G]er №2

Код: Выделить всё

/*
    
    Для примера скрипт вполне подойдет
    Смена цвета ТС на  TextDraw`ах
    Автор: Sky[L]a[G]er

*/
#include <a_samp>

new Text:ChangeColor[66];
new ColorsAvailable[66] = {
    1, 0, 2, 3, 4, 6, 8, 12, 13, 16, 17, 20, 24, 28, 44, 43, 46, 51, 52, 55, 57, 79, 93, 86, 87, 65, 97, 112, 117, 118, 126, 111, 103, 102, 128, 145, 136, 139, 143, 158, 175, 170, 171, 154, 176, 179, 182, 191, 194, 195, 196, 198, 215, 224, 225, 237, 241, 244, 245, 248, 251, 252, 253, 254
};


new AllCarColors[256] = {
    0x000000FF,0xFFFFFFFF,0x55aaa7FF,0xce575bFF,0x58685dFF,0xb06c77FF,0xf8ad38FF,0x7a96acFF,0xdfdec9FF,0x81897aFF,
    0x677776FF,0x93948eFF,0x7e9689FF,0x807c70FF,0xe8eac3FF,0xbab9a5FF,0x73996aFF,0xa54549FF,0xc55063FF,0xd8d5b2FF,
    0x86979eFF,0xa66b67FF,0x8e4556FF,0xcfc3a9FF,0x6c6d65FF,0x5b5a55FF,0xafb295FF,0x77705eFF,0x5a6466FF,0xa89f82FF,
    0x64433aFF,0x73423dFF,0xb5bcb4FF,0xa1a58aFF,0x96947fFF,0x918a6cFF,0x5a5b53FF,0x5b6656FF,0xa8b186FF,0x8d9389FF,
    0x3f3c35FF,0x80765dFF,0x873b3bFF,0x7d3334FF,0x3b5741FF,0x71413dFF,0xaaa176FF,0x89815dFF,0xc2b894FF,0xd6d0b0FF,
    0xa9a98fFF,0x647d67FF,0x849283FF,0x495261FF,0x565b61FF,0x9d846eFF,0xb0af90FF,0xa19273FF,0x7a3138FF,0x5c6c69FF,
    0x9e9c83FF,0x887554FF,0x803c3dFF,0x928f7cFF,0xcfcda7FF,0xd4d27fFF,0x6f534fFF,0xa7ada1FF,0xe1dd9eFF,0xd9b79bFF,
    0xa84645FF,0x96a097FF,0x6f725dFF,0xb6bd93FF,0x764040FF,0x434842FF,0xb0ac89FF,0xb5a778FF,0x8a473fFF,0x375369FF,
    0x9a555aFF,0xaa9c75FF,0xac5359FF,0x56665bFF,0x786151FF,0x995061FF,0x60843cFF,0x72858bFF,0x7c454aFF,0xa7a373FF,
    0xb8b29aFF,0x585e5cFF,0x827f6eFF,0x388a85FF,0x4b6566FF,0x4c5858FF,0xc3c0a1FF,0x97a79aFF,0x80a999FF,0xe1c99dFF,
    0x6e8c8aFF,0x57585cFF,0xd6b98dFF,0x426d80FF,0xa29368FF,0x818274FF,0x3d717fFF,0xb6ab7eFF,0x587482FF,0x696a62FF,
    0x8f7d59FF,0xa3a091FF,0x80948bFF,0x786954FF,0x72866aFF,0xaa4553FF,0x53616aFF,0x8f4f4fFF,0xbfc1b6FF,0x938369FF,
    0xb5a180FF,0x763b41FF,0x747567FF,0x846c50FF,0x914b4dFF,0x38526bFF,0xef87a2FF,0x3c3d38FF,0x6cb85dFF,0x725a4eFF,
    0x78acaaFF,0x987e59FF,0x9b675aFF,0x545d4cFF,0x706c83FF,0x7dc6bdFF,0xcb90c6FF,0x7fca6fFF,0xf7ebc3FF,0x9697abFF,
    0xc3bda3FF,0xbdaf88FF,0xcdbf67FF,0xab8e90FF,0xa28796FF,0xd2ee99FF,0xbd8a93FF,0xaa6a85FF,0x72715cFF,0x665b45FF,
    0x656952FF,0x7e926fFF,0x7398b5FF,0x7da477FF,0x6bcf79FF,0x65c8a9FF,0xe0d59dFF,0xc8c5b4FF,0xde7c5fFF,0x77694cFF,
    0x5d6d49FF,0xd17f74FF,0x6f93b3FF,0x62b79aFF,0x667264FF,0x6aa998FF,0x6daaa5FF,0xaa7faaFF,0x875e4aFF,0xbfb1b0FF,
    0xb4a8acFF,0x987f9dFF,0x686947FF,0x80604bFF,0x8e6c50FF,0xd8685aFF,0xd294a9FF,0xbf9899FF,0xbb839cFF,0x826168FF,
    0xbd825aFF,0xba6254FF,0xd28865FF,0xcf7958FF,0xc88c84FF,0xbba899FF,0x4f5847FF,0x516b48FF,0x6c825bFF,0x677c5bFF,
    0xaa757dFF,0x8dca85FF,0xd4c7a4FF,0xc0bfaaFF,0xdfd249FF,0xbac775FF,0xbdc2a2FF,0xbabb5eFF,0x717caaFF,0x7d7b4aFF,
    0xc1aa74FF,0x536370FF,0x79936cFF,0x606f6cFF,0x798f8dFF,0x515459FF,0x4d585aFF,0x677a76FF,0x7d99a7FF,0x5d7b7dFF,
    0x6f8b8cFF,0x72668aFF,0xac6c53FF,0xd3caadFF,0x98a053FF,0x545945FF,0xcc996eFF,0xa3caafFF,0xd29779FF,0xcc9054FF,
    0xdd888fFF,0xd6c377FF,0xd07151FF,0x596271FF,0x936556FF,0x89864fFF,0x9cd665FF,0x5a765dFF,0xd0b858FF,0x66b758FF,
    0x83605aFF,0xb79153FF,0xc37d9fFF,0xbf6791FF,0x5b7f51FF,0x71894fFF,0x5d7166FF,0xc3919dFF,0xcca470FF,0xaf6c52FF,
    0x77c4a4FF,0x99c556FF,0x9b616fFF,0x63bd63FF,0x7c5d49FF,0x57694fFF,0x809ea8FF,0x748080FF,0x935d5bFF,0x90575eFF,
    0xaaa184FF,0x7d7e70FF,0x716d62FF,0xc9c3a3FF,0x9b907aFF,0x838786FF
};


public OnFilterScriptInit()
{
    ChangeColor[0] = TextDrawCreate(17.0, 138.0, "box");
    TextDrawLetterSize(ChangeColor[0], 0.0, 17.0); 
    TextDrawTextSize
(ChangeColor[0], 171.0, 0.0);TextDrawAlignment(ChangeColor[0], 1); 
    TextDrawColor
(ChangeColor[0], -1);TextDrawUseBox(ChangeColor[0], 1); 
    TextDrawBoxColor
(ChangeColor[0], 102);TextDrawSetOutline(ChangeColor[0], 0); 
    TextDrawBackgroundColor
(ChangeColor[0], 255);TextDrawFont(ChangeColor[0], 1); 
    TextDrawSetProportional
(ChangeColor[0], 1);TextDrawSetShadow(ChangeColor[0], 0);
    
    ChangeColor
[1] = TextDrawCreate(138.667617, 298.116699, "Close");
    TextDrawLetterSize(ChangeColor[1], 0.400000, 1.600000);
    TextDrawTextSize(ChangeColor[1], 17.0, 62.327926);TextDrawAlignment(ChangeColor[1], 2);
    TextDrawColor(ChangeColor[1], -1);TextDrawUseBox(ChangeColor[1], 1);
    TextDrawBoxColor(ChangeColor[1], 102);TextDrawSetOutline(ChangeColor[1], 0);
    TextDrawBackgroundColor(ChangeColor[1], 255);TextDrawFont(ChangeColor[1], 2);
    TextDrawSetProportional(ChangeColor[1], 1);TextDrawSetShadow(ChangeColor[1], 0);
    TextDrawSetSelectable(ChangeColor[1], 1);
    
    new Float
:X=19.0,Float:Y=139.0,count = 1;
    for(new i=2; i < sizeof(ChangeColor); i++)
    {
        ChangeColor[i] = TextDrawCreate(X, Y, "box");
        TextDrawBackgroundColor(ChangeColor[i], AllCarColors[ColorsAvailable[i-2]]);
        TextDrawLetterSize(ChangeColor[i], 0.0, 18.0);TextDrawTextSize(ChangeColor[i], 18.0, 18.0);
        TextDrawAlignment(ChangeColor[i], 1);TextDrawColor(ChangeColor[i], -1);
        TextDrawUseBox(ChangeColor[i], 1);TextDrawBoxColor(ChangeColor[i], 0);
        TextDrawSetOutline(ChangeColor[i], 0);TextDrawFont(ChangeColor[i], 5);
        TextDrawSetProportional(ChangeColor[i], 1);TextDrawSetShadow(ChangeColor[i], 1);
        TextDrawSetPreviewModel(ChangeColor[i], 19349);
        TextDrawSetPreviewRot(ChangeColor[i], -16.0, 0.0, -180.0, 0.7);
        TextDrawSetSelectable(ChangeColor[i], 1);
        
        X
+=19.0;
        count++;
        if(count == 9)
        {
            Y+=19.0;
            X = 19.0;
            count = 1;
        }
    }
}

public OnFilterScriptExit()
{
    for(new i; i < sizeof(ChangeColor); i++)
    {
        TextDrawDestroy(ChangeColor[i]);
    }
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys==KEY_NO && IsPlayerInAnyVehicle(playerid))
    {
        for(new i; i < sizeof(ChangeColor); i++)
        {
            TextDrawSetPreviewModel(ChangeColor[i], 19349);
            TextDrawShowForPlayer(playerid,ChangeColor[i]);
        }
        SelectTextDraw(playerid, 0xFFFFFF66) ;
    }
}

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if (clickedid == ChangeColor[1] )
    {
        CancelSelectTextDraw(playerid);
        for(new i; i < sizeof(ChangeColor); i++)
        {
            TextDrawHideForPlayer(playerid,ChangeColor[i]);
        }
    }
    for(new i=2; i < sizeof(ChangeColor); i++)
    {
        if(clickedid == ChangeColor[i])
        {
            CancelSelectTextDraw(playerid);
            ChangeVehicleColor(GetPlayerVehicleID(playerid),ColorsAvailable[i-1],ColorsAvailable[i-1]);
            for(new j; j < sizeof(ChangeColor); j++)
            {
                TextDrawHideForPlayer(playerid,ChangeColor[j]);
            }
        }
    }
    return 1 ;
}



Смена цвета авто.png
by: LinkiNPark 26.06.2012

Код: Выделить всё

/*

    by: LinkiNPark 26.06.2012

*/


#include a_samp

#define X_SIZE 35.0
#define X_MAX > 216.0
#define X_PLUS += 18.0
#define Y_SIZE 160.0
#define Y_PLUS += 16.0

new    Text: Draw[122], color[][] =
{
        {0, 0x00000099}, {1, 0xf5f5f599}, {2, 0x2a77a199}, {3, 0x84051099}, {4, 0x25373999}, {5, 0x87446f99}, {6, 0xd68f1199}, {7, 0x4c75b799}, {8, 0xbdbdc599}, {9, 0x5e707299}, {10, 0x46597a99}, {11, 0x66697a99},
        {12, 0x5e7e8d99}, {13, 0x58595b99}, {14, 0xd6dbd599}, {15, 0x9ca1a499}, {16, 0x34603f99}, {17, 0x740e1b99}, {18, 0x7c0a2b99}, {19, 0xa09d9499}, {20, 0x3b4e7999}, {21, 0x732e4099}, {22, 0x691e3c99}, {23, 0x96918d99},
        {24, 0x51545999}, {25, 0x3f3e4699}, {26, 0xa5a9a899}, {27, 0x645c5a99}, {28, 0x3c496999}, {29, 0x96959199}, {30, 0x431f2199}, {31, 0x5f272a99}, {32, 0x8494ab99}, {33, 0x757a7d99}, {34, 0x64646499},{35, 0x5b585399},
        {36, 0x25252799}, {37, 0x2e3a3699}, {38, 0x93a39899}, {39, 0x6d7a8a99},{40, 0x28201e99}, {41, 0x6f686099}, {42, 0x7c1c2899}, {43, 0x600a1599}, {44, 0x19382899}, {45, 0x5c1b1f99}, {46, 0x9c987299}, {47, 0x7a756199},
        {48, 0x98958699}, {49, 0xacb0b199}, {50, 0x848a8899}, {51, 0x30504599}, {52, 0x4e636899}, {53, 0x16224899}, {54, 0x282f4c99}, {55, 0x7e625799}, {56, 0x9fa4aa99}, {57, 0x9c8d7099}, {58, 0x6e182199}, {59, 0x4e688199},
        {60, 0x9c9d9899}, {61, 0x90734799}, {62, 0x661d2699}, {63, 0x949c9f99}, {64, 0xa3a8a499}, {65, 0x8f8c4799},    {66, 0x331a1d99}, {67, 0x697a8a99}, {68, 0xaaad8e99}, {69, 0xac988f99}, {70, 0x86202e99}, {71, 0x70829899},
        {72, 0x58595399}, {73, 0x9aa68e99}, {74, 0x601a1a99}, {75, 0x21212d99}, {76, 0xa4a09799}, {77, 0xab9d8399},    {78, 0x78222b99}, {79, 0x0e326e99}, {80, 0x722a4099}, {81, 0x7a715f99}, {82, 0x741c2899}, {83, 0x1d2f3199},
        {84, 0x4e322f99}, {85, 0x7d1b4499}, {86, 0x2f5b2099}, {87, 0x395a8399}, {88, 0x6c283799}, {89, 0xa7a28f99}, {90, 0xb0b2b199}, {91, 0x36415599}, {92, 0x6d6d6f99}, {93, 0x0f6a8999}, {94, 0x204b6d99}, {95, 0x2c3d5799},
        {96, 0x9a9e9d99}, {97, 0x6d849499}, {98, 0x4d5c5f99}, {99, 0xac9b7f99}, {100, 0x416c8f99},{101, 0x20253b99}, {102, 0xac927799}, {103, 0x12457499}, {104, 0x96816c99}, {105, 0x64686b99}, {106, 0x11508399}, {107, 0xa1998499},
        {108, 0x38569499}, {109, 0x52566199}, {110, 0x7e695699}, {111, 0x8d919a99}, {112, 0x596d8699}, {113, 0x48343399}, {114, 0x45625099}, {115, 0x730a2899}, {116, 0x22355699}, {117, 0x630d1a99}, {118, 0xa3adc699}, {119, 0x6a585499}, {120, 0x9b8a8099}
};
public OnFilterScriptInit()
{
    Draw[121] = TextDrawCreate(29.000000, 156.000000, ".");
    TextDrawBackgroundColor(Draw[121], 255), TextDrawFont(Draw[121], 1);
    TextDrawLetterSize(Draw[121], -0.009999, 19.700038), TextDrawColor(Draw[121], -1);
    TextDrawSetOutline(Draw[121], 0), TextDrawSetProportional(Draw[121], 1);
    TextDrawSetShadow(Draw[121], 1), TextDrawUseBox(Draw[121], 1);
    TextDrawBoxColor(Draw[121], 0x00000099), TextDrawTextSize(Draw[121], 231.000000, 6.000000);
    for (new i, Float: x = X_SIZE, Float: y = Y_SIZE; i != sizeof color; i ++)
    {
        if (x X_MAX) x = X_SIZE, y Y_PLUS;
        Draw[i] = TextDrawCreate(x, y, "."), TextDrawTextSize(Draw[i], x + 10.0, 10.00);
        TextDrawBackgroundColor(Draw[i], 0x00000000), TextDrawFont(Draw[i], 1);
        TextDrawLetterSize(Draw[i], 0.0, 1.00), TextDrawColor(Draw[i], -1);
        TextDrawSetOutline(Draw[i], 0), TextDrawSetProportional(Draw[i], 1);
        TextDrawSetShadow(Draw[i], 0), TextDrawUseBox(Draw[i], 1);
        TextDrawBoxColor(Draw[i], color[i][1]), x X_PLUS;
        TextDrawSetSelectable (Draw[i], true);
    }
    return 1;
}
public OnFilterScriptExit()
{
    for (new i; i != sizeof Draw; i ++) TextDrawHideForAll(Draw[i]), TextDrawDestroy (Draw[i]);
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    for (new i; i != sizeof(Draw); i ++)
    if (Draw[i] == clickedid) ChangeVehicleColor(GetPlayerVehicleID(playerid), color[i][0], color[i][0]);
     if (_:clickedid == INVALID_TEXT_DRAW)
    {
        for (new t; t != sizeof(Draw); t ++) TextDrawHideForPlayer(playerid, Draw[t]);
   }
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys == KEY_NO && GetPlayerState(playerid) == 2)
    {
        for (new i; i != sizeof(Draw); i ++) TextDrawShowForPlayer(playerid, Draw[i]);
        SelectTextDraw(playerid, 0xffffff00);
    }
    return 1;
Изображение

! ! !


  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Скрипты / FS»

Кто сейчас на форуме