CS:GO Plugins Hud Write V 1.3

voevoda

Administrative
Регистрация
18 Май 2017
Сообщения
612
Реакции
118
Баллы
43
Command :

!hwrite <TEXT>

!hwrite @r <text>
!hwrite @g <text>
!hwrite @b <text>
!hwrite @w <text>
!hwrite @y <text>
!hwrite @bl <text>


Cvars :

!cvar mithat_hud_red 255
!cvar mithat_hud_green 0
!cvar mithat_hud_blue 0

!cvar mithat_hud_y 0.45
!cvar mithat_hud_x 0.350




Код:
}
public Action write(int client, int args)
{
    if (args < 1)
    {
        ReplyToCommand(client, "Use: sm_hwrite <text>");
        return Plugin_Handled;
    }

    char text[192];
    GetCmdArgString(text, sizeof(text));

    for(int i = 1; i <= MaxClients; i++)
    {
        if(IsClientInGame(i) && !IsFakeClient(i))
        {
            SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.0, GetConVarInt(hud_red), GetConVarInt(hud_blue), GetConVarInt(hud_green), 255, 0, 0.25, 0.5, 0.3);
          
            if (StrContains(text[0], "@r", false) == 0)
            {
                ReplaceString(text, sizeof(text), "@r", "");
                SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.0, 255, 0, 0, 255, 0, 0.25, 0.5, 0.3);
                ShowHudText(i, 1, text);
            }
          
            if (StrContains(text[0], "@g", false) == 0)
            {
                ReplaceString(text, sizeof(text), "@g", "");
                SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.0, 0, 255, 0, 255, 0, 0.25, 0.5, 0.3);
                ShowHudText(i, 1, text);
            }
          
            if (StrContains(text[0], "@b", false) == 0)
            {
                ReplaceString(text, sizeof(text), "@b", "");
                SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.0, 0, 0, 255, 255, 0, 0.25, 0.5, 0.3);
                ShowHudText(i, 1, text);
            }
          
            if (StrContains(text[0], "@w", false) == 0)
            {
                ReplaceString(text, sizeof(text), "@w", "");
                SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.0, 255, 255, 255, 255, 0, 0.25, 0.5, 0.3);
                ShowHudText(i, 1, text);
            }
          
            if (StrContains(text[0], "@y", false) == 0)
            {
                ReplaceString(text, sizeof(text), "@y", "");
                SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.0, 255, 255, 51, 255, 0, 0.25, 0.5, 0.3);
                ShowHudText(i, 1, text);
            }
          
            if (StrContains(text[0], "@bl", false) == 0)
            {
                ReplaceString(text, sizeof(text), "@bl", "");
                SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.0, 0, 0, 0, 255, 0, 0.25, 0.5, 0.3);
                ShowHudText(i, 1, text);
            }
          
            ShowHudText(i, 1, text);
        }
    }
    return Plugin_Handled;
}

 

Вложения

Сверху Снизу