The Night Fury

Участник
Сообщения
1,300
Реакции
1,395
Я прекрасно понимаю, что часто названия плагинов можно очень просто забыть. Однако это становится причиной постоянного создания тем рода "помогите найти плагин X".

Так вот, чтобы содержать форум в порядке и чистоте, поступим следующим образом:
  1. В дальнейшем создаваемые темы с "помогите найти плагин" будут удаляться, а авторам — выдаваться предупреждения
  2. Если Вы захотите найти плагин, то сначала воспользуйтесь поиском

Если всё же не удалось найти плагин, заполните следующую форму и ответьте в этой теме:

  • Функции плагина
  • Мод/Игра, которая использует этот плагин

Прежде чем отвечать в теме, воспользуйтесь поиском гугла, который почти всегда находит нужное.

Старые темы будут перемещены в корзину.
 
Последнее редактирование модератором:

Анатолий))))))))

Участник
Сообщения
63
Реакции
4
добавьте пожалуйста русский перевод
--- Добавлено позже ---
или вообще убрать перевод
 

Вложения

  • flashprotect.sp
    5.2 КБ · Просмотры: 3
  • flashprotect.phrases.txt
    410 байт · Просмотры: 5
Последнее редактирование:

Rostu

Добрая душа
Сообщения
986
Реакции
622
@Анатолий)))))))), А это я люблю
или вообще убрать перевод

PHP:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION "1.3.0"

new bool:g_bFlashed[MAXPLAYERS+1];

new Handle:g_hCvarEnable;
new Handle:g_hCvarDamage;
new Handle:g_hCvarDuration;
new Handle:g_hCvarMinHealth;

public Plugin:myinfo =
{
    name = "FlashProtect",
    author = "bl4nk",
    description = "Damage players who flash their own team",
    version = PLUGIN_VERSION,
    url = "http://forums.alliedmods.net"
};

public OnPluginStart()
{

    CreateConVar("sm_flashprotect_version", PLUGIN_VERSION, "FlashProtect Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
    g_hCvarEnable = CreateConVar("sm_flashprotect_enable", "1", "Enable/Disable the plugin", FCVAR_PLUGIN, true, 0.0, true, 1.0);
    g_hCvarDamage = CreateConVar("sm_flashprotect_damage", "15", "Damage to do per second of flash", FCVAR_PLUGIN, true, 0.0, false, _);
    g_hCvarDuration = CreateConVar("sm_flashprotect_duration", "1.5", "Maximum duration that a flash can last for before it's punishable", FCVAR_PLUGIN, true, 0.0, true, 7.0);
    g_hCvarMinHealth = CreateConVar("sm_flashprotect_minhealth", "20", "Minimum health a player can have without being damaged for team flashing", FCVAR_PLUGIN, true, 0.0, true, 100.0);

    HookEvent("player_blind", Event_PlayerBlind);
    HookEvent("flashbang_detonate", Event_FlashbangDetonate);
}

/* Called when a player is blinded by a flashbang */
public Event_PlayerBlind(Handle:event, const String:name[], bool:dontBroadcast)
{
    /* Is the plugin enabled? */
    if (!GetConVarBool(g_hCvarEnable))
    {
        return;
    }

    /* The client that was blinded */
    new client = GetClientOfUserId(GetEventInt(event, "userid"));

    /* Check and see if the flash magnitude is high (255) */
    if (GetEntPropFloat(client, Prop_Send, "m_flFlashMaxAlpha") == 255)
    {
        /* Get the max limited flash time without punishment */
        new Float:durationLimit = GetConVarFloat(g_hCvarDuration);

        /* If the player was flashed for longer than the allowed time, punish the flasher */
        if (GetEntPropFloat(client, Prop_Send, "m_flFlashDuration") > durationLimit)
        {
            /* Mark the player as being flashed */
            g_bFlashed[client] = true;
        }
    }
}

/* Called when a flashbang has detonated (after the players have already been blinded) */
public Event_FlashbangDetonate(Handle:event, const String:name[], bool:dontBroadcast)
{
    /* Is the plugin enabled? */
    if (!GetConVarBool(g_hCvarEnable))
    {
        return;
    }

    /* The number of flashed players, and the player that threw the flashbang */
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    new count, damage, dps = GetConVarInt(g_hCvarDamage);

    /* Loop through all flashed players to check if they are on the same team */
    for (new i = 1; i <= MaxClients; i++)
    {
        /* Flash player found */
        if (g_bFlashed[i] == true)
        {
            /* Get the time the player was flashed for */
            new Float:flashTime = GetEntPropFloat(i, Prop_Send, "m_flFlashDuration");

            /* Format the flashed time to be 2 decimal places */
            decl String:sFlash[8];
            Format(sFlash, sizeof(sFlash), "%.2f", flashTime);

            /* Did the player flash themself? */
            
            /* Did the player flash an alive teammate? */
            if (GetClientTeam(i) == GetClientTeam(client) && IsPlayerAlive(i))
                /* Increment the damage taken depending on how long the player was flashed for */
                damage += RoundFloat(dps * flashTime);
            

            /* The flashed player has been handled, mark them as not being flashed any longer */
            g_bFlashed[i] = false;
        }
    }

    /* If at least one player was flashed, send a message to teammates */
    if (count > 0)
        /* Punish the flasher for blinding teammates */
        PunishFlasher(client, damage);
    
}

PunishFlasher(client, damage)
{
    new health = GetPlayerHealth(client);
    new minHealth = GetConVarInt(g_hCvarMinHealth);

    if (minHealth > 0 && health - damage < minHealth)
    {
        SlapPlayer(client, health - minHealth);
    }
    else
    {
        if (damage >= health)
        {
            ForcePlayerSuicide(client);
        }
        else
        {
            SlapPlayer(client, damage);
        }
    }
}

GetPlayerHealth(client)
{
    return GetEntProp(client, Prop_Send, "m_iHealth");
}
 

Анатолий))))))))

Участник
Сообщения
63
Реакции
4
@Анатолий)))))))), А это я люблю


PHP:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION "1.3.0"

new bool:g_bFlashed[MAXPLAYERS+1];

new Handle:g_hCvarEnable;
new Handle:g_hCvarDamage;
new Handle:g_hCvarDuration;
new Handle:g_hCvarMinHealth;

public Plugin:myinfo =
{
    name = "FlashProtect",
    author = "bl4nk",
    description = "Damage players who flash their own team",
    version = PLUGIN_VERSION,
    url = "http://forums.alliedmods.net"
};

public OnPluginStart()
{

    CreateConVar("sm_flashprotect_version", PLUGIN_VERSION, "FlashProtect Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
    g_hCvarEnable = CreateConVar("sm_flashprotect_enable", "1", "Enable/Disable the plugin", FCVAR_PLUGIN, true, 0.0, true, 1.0);
    g_hCvarDamage = CreateConVar("sm_flashprotect_damage", "15", "Damage to do per second of flash", FCVAR_PLUGIN, true, 0.0, false, _);
    g_hCvarDuration = CreateConVar("sm_flashprotect_duration", "1.5", "Maximum duration that a flash can last for before it's punishable", FCVAR_PLUGIN, true, 0.0, true, 7.0);
    g_hCvarMinHealth = CreateConVar("sm_flashprotect_minhealth", "20", "Minimum health a player can have without being damaged for team flashing", FCVAR_PLUGIN, true, 0.0, true, 100.0);

    HookEvent("player_blind", Event_PlayerBlind);
    HookEvent("flashbang_detonate", Event_FlashbangDetonate);
}

/* Called when a player is blinded by a flashbang */
public Event_PlayerBlind(Handle:event, const String:name[], bool:dontBroadcast)
{
    /* Is the plugin enabled? */
    if (!GetConVarBool(g_hCvarEnable))
    {
        return;
    }

    /* The client that was blinded */
    new client = GetClientOfUserId(GetEventInt(event, "userid"));

    /* Check and see if the flash magnitude is high (255) */
    if (GetEntPropFloat(client, Prop_Send, "m_flFlashMaxAlpha") == 255)
    {
        /* Get the max limited flash time without punishment */
        new Float:durationLimit = GetConVarFloat(g_hCvarDuration);

        /* If the player was flashed for longer than the allowed time, punish the flasher */
        if (GetEntPropFloat(client, Prop_Send, "m_flFlashDuration") > durationLimit)
        {
            /* Mark the player as being flashed */
            g_bFlashed[client] = true;
        }
    }
}

/* Called when a flashbang has detonated (after the players have already been blinded) */
public Event_FlashbangDetonate(Handle:event, const String:name[], bool:dontBroadcast)
{
    /* Is the plugin enabled? */
    if (!GetConVarBool(g_hCvarEnable))
    {
        return;
    }

    /* The number of flashed players, and the player that threw the flashbang */
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    new count, damage, dps = GetConVarInt(g_hCvarDamage);

    /* Loop through all flashed players to check if they are on the same team */
    for (new i = 1; i <= MaxClients; i++)
    {
        /* Flash player found */
        if (g_bFlashed[i] == true)
        {
            /* Get the time the player was flashed for */
            new Float:flashTime = GetEntPropFloat(i, Prop_Send, "m_flFlashDuration");

            /* Format the flashed time to be 2 decimal places */
            decl String:sFlash[8];
            Format(sFlash, sizeof(sFlash), "%.2f", flashTime);

            /* Did the player flash themself? */
           
            /* Did the player flash an alive teammate? */
            if (GetClientTeam(i) == GetClientTeam(client) && IsPlayerAlive(i))
                /* Increment the damage taken depending on how long the player was flashed for */
                damage += RoundFloat(dps * flashTime);
           

            /* The flashed player has been handled, mark them as not being flashed any longer */
            g_bFlashed[i] = false;
        }
    }

    /* If at least one player was flashed, send a message to teammates */
    if (count > 0)
        /* Punish the flasher for blinding teammates */
        PunishFlasher(client, damage);
   
}

PunishFlasher(client, damage)
{
    new health = GetPlayerHealth(client);
    new minHealth = GetConVarInt(g_hCvarMinHealth);

    if (minHealth > 0 && health - damage < minHealth)
    {
        SlapPlayer(client, health - minHealth);
    }
    else
    {
        if (damage >= health)
        {
            ForcePlayerSuicide(client);
        }
        else
        {
            SlapPlayer(client, damage);
        }
    }
}

GetPlayerHealth(client)
{
    return GetEntProp(client, Prop_Send, "m_iHealth");
}
вообще убрал перевод да?
 

Ice_Sochi

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

Вложения

  • flashprotect.sp
    5.2 КБ · Просмотры: 3
  • flashprotect.phrases.txt
    728 байт · Просмотры: 2

Heinz

Участник
Сообщения
167
Реакции
47
Ставил подобный плагин на сервер!Дружище,я его не советую...Вспомни - ка как часто ты сам хз куда кидаешь флеху?)))
Дело твое...
 

Анатолий))))))))

Участник
Сообщения
63
Реакции
4
Ставил подобный плагин на сервер!Дружище,я его не советую...Вспомни - ка как часто ты сам хз куда кидаешь флеху?)))
Дело твое...
очень редко,просят игроки сервера поставить наказание
 

Анатолий))))))))

Участник
Сообщения
63
Реакции
4
А Вы точно играете у себя на сервере?)
точно,руки увы не у всех кривые,есть инфа есть радар на такие случаи
--- Добавлено позже ---
@Анатолий)))))))), Нет, ну есть вариант наказание если флеш более 2 игроков, но это как идея :ab:
спасибо,уже все сделал)
--- Добавлено позже ---
ребят!вот такая ошибка помогите исправить
[SM] Call stack trace:
L 09/06/2017 - 12:18:31: [SM] [0] GetEntPropFloat
L 09/06/2017 - 12:18:31: [SM] [1] Line 87, C:\Users\Анатолий\Desktop\sm\addons\sourcemod\scripting\flashprotect.sp::Event_FlashbangDetonate()
L 09/06/2017 - 12:18:35: [SM] Exception reported: Entity 13 (13) is invalid
L 09/06/2017 - 12:18:35: [SM] Blaming: flashprotect.smx()
--- Добавлено позже ---
ребят поможет кто нибудь?
 

Вложения

  • flashprotect.sp
    5.2 КБ · Просмотры: 2
Последнее редактирование:

xek

Рыба клоун
Сообщения
1,652
Реакции
636
Доброго времени суток. Есть ли плагин для сообщения допустим в msay или флуда в чат в определенное время суток для cs go. Перед рестартом сервера.
 
A

Altaj

Ищу плагин воскрешения игрока на определенную кнопку, когда ты рядом с ним.
 

suicide_xD

Участник
Сообщения
212
Реакции
14
Нужен плагин, чтобы админы не могли менять свой ник, тоесть как прописал их в соурбанс с таким ником, и они не могли его менять! css v34 sm 1.6.3
 
Сверху Снизу