TE_SetupBeamRingPoint на 0.1 сек!

Колян

Участник
Сообщения
180
Реакции
5
TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 1, 10, 1.0, 2.0, 0.0, {255,255,255,255}, 10, 1);

Как заставить эту ерунду пропасть ровно через 0.1 сек...

PHP:
new i = 0;
public Action:lolSay(client, args)
{
    float pos[3];
    GetLookPos(client, pos);
    pos[2] += 5.0;
    PrintToChatAll("%d",i);
    if (i == 0)
    {
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 1, 10, 1.0, 2.0, 0.0, {255,255,255,255}, 10, 0);
    TE_SendToAll();
    pos[0] += 320.0;
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 10, 10, 1.0, 2.0, 0.0, {0,255,255,255}, 10, 0);
    TE_SendToAll();
    pos[0] += 320.0;
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 100, 10, 1.0, 2.0, 0.0, {0,255,0,255}, 10, 0);
    TE_SendToAll();
    }
    else if (i == 1)
    {
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 1, 10, 1.0, 2.0, 0.0, {255,255,255,255}, 10, 0);
    TE_SendToAll();
    pos[0] += 320.0;
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 1, 1, 1.0, 2.0, 0.0, {0,255,255,255}, 10, 0);
    TE_SendToAll();
    pos[0] += 320.0;
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 1, 100, 1.0, 2.0, 0.0, {0,255,0,255}, 10, 0);
    TE_SendToAll();
    }
    else if (i == 2)
    {
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 1, 10, 1.0, 2.0, 0.0, {255,255,255,255}, 10, 0);
    TE_SendToAll();
    pos[0] += 320.0;
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 1, 10, 1.0, 2.0, 0.0, {0,255,255,255}, 1, 0);
    TE_SendToAll();
    pos[0] += 320.0;
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 1, 10, 1.0, 2.0, 0.0, {0,255,0,255}, 100, 0);
    TE_SendToAll();
    }
    else if (i == 3)
    {
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 1, 10, 1.0, 2.0, 0.0, {255,255,255,255}, 10, 1);
    TE_SendToAll();
    pos[0] += 320.0;
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 1, 10, 1.0, 2.0, 0.0, {0,255,255,255}, 10, 10);
    TE_SendToAll();
    pos[0] += 320.0;
    TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, 1, 10, 1.0, 2.0, 0.0, {0,255,0,255}, 10, 100);
    TE_SendToAll();
    }
   
    i++;
    if (i == 4) i = 0;
}

Игрался так, но все 3 круга синхронно исчезают... примерно за 0.5 сек.. а нужно в 0.1 сек..(
 

Grey83

не пишу плагины с весны 2022
Сообщения
8,569
Реакции
5,071
тогда уж лучше что-то вроде этого:
PHP:
new const colors[][] = {
{255,255,255,255},
{0,255,255,255},
{0,255,0,255}
};

public Action:lolSay(client, args)
{
    static i, iStartFrame[3], iFrameRate[3], iSpeed[3], iFlags[3];
    new Float:pos[3];
    GetLookPos(client, pos);
    pos[2] += 5.0;
    PrintToChatAll("%d",i);

    switch(i)
    {
        case 0:
        {
            iStartFrame = {1, 10, 100};
            iFrameRate = {10, 10, 10};
            iSpeed = {10, 10, 10};
            iFlags = {0, 0, 0};
        }
        case 1:
        {
            iStartFrame = {1, 1, 1};
            iFrameRate = {10, 1, 100};
            iSpeed = {10, 10, 10};
            iFlags = {0, 0, 0};
        }
        case 2:
        {
            iStartFrame = {1, 1, 1};
            iFrameRate = {10, 10, 10};
            iSpeed = {10, 1, 100};
            iFlags = {0, 0, 0};
        }
        case 3:
        {
            iStartFrame = {1, 1, 1};
            iFrameRate = {10, 10, 10};
            iSpeed = {10, 10, 10};
            iFlags = {1, 10, 100};
        }
    }

    for(new j; j < 3; j++)
    {
        TE_SetupBeamRingPoint(pos, 300.0, 300.1, g_BeamSprite, g_HaloSprite, iStartFrame[j], iFrameRate[j], 0.1, 2.0, 0.0, colors[j], iSpeed[j], iFlags[j]);
        TE_SendToAll();
        pos[0] += 320.0;
    }

    i++;
    if (i > 3) i = 0;
}
 

R1KO

fuck society
Сообщения
9,457
Реакции
7,786
  • Команда форума
  • #6

Колян

Участник
Сообщения
180
Реакции
5

Grey83

не пишу плагины с весны 2022
Сообщения
8,569
Реакции
5,071
@Колян, тебе же Danyas и R1KO ссылки дали.
Там смотришь каким идёт параметр Width
А вообще TE_SetupBeamRingPoint(const Float:центр[3], Float:начальный_радиус, Float:конечный_радиус, индекс_модели, индекс_гало, начальный_кадр,
частота_кадров, Float:время_существования, Float:ширина, Float:амплитуда, const цвет[4], скорость, флаги)
 
Сверху Снизу