Проблема с RemoveRadar

VSN7

Участник
Сообщения
26
Реакции
4
Доброй ночи всем, вот появилось ошибка в соурсмоде, связанной с плагином удаляющий радар
Как можно исправить?
C-подобный:
L 08/28/2017 - 18:10:46: SourceMod error session started
L 08/28/2017 - 18:10:46: Info (map "awp_lego_2") (file "errors_20170828.log")
L 08/28/2017 - 18:10:46: [SM] Exception reported: Entity 7 (7) is invalid
L 08/28/2017 - 18:10:46: [SM] Blaming: DisableRadar.smx
L 08/28/2017 - 18:10:46: [SM] Call stack trace:
L 08/28/2017 - 18:10:46: [SM]   [0] GetEntProp
L 08/28/2017 - 18:10:46: [SM]   [1] Line 33, /home/forums/content/files/2/4/8/3/8/6/133573.attach::RemoveRadar
L 08/28/2017 - 18:47:41: Error log file session closed.
C-подобный:
#include <sourcemod>

#define HIDE_RADAR_CSGO 1<<12

new String:strGame[10];

public Plugin:myinfo =
{
    name = "Disable Radar",
    author = "Internet Bully",
    description = "Turns off Radar on spawn",
    version     = "1.2",
    url = "http://www.sourcemod.net/"
}

public OnPluginStart()
{
    HookEvent("player_spawn", Player_Spawn);
    
    GetGameFolderName(strGame, sizeof(strGame));
    
    if(StrContains(strGame, "cstrike") != -1)
        HookEvent("player_blind", Event_PlayerBlind, EventHookMode_Post);
}
public Player_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    CreateTimer(0.0, RemoveRadar, client);
} 

public Action:RemoveRadar(Handle:timer, any:client)
{   
    if(StrContains(strGame, "csgo") != -1) SetEntProp(client, Prop_Send, "m_iHideHUD", GetEntProp(client, Prop_Send, "m_iHideHUD") | HIDE_RADAR_CSGO);
    else if(StrContains(strGame, "cstrike") != -1)
        CSSHideRadar(client);
}

public Event_PlayerBlind(Handle:event, const String:name[], bool:dontBroadcast)  // from GoD-Tony's "Radar Config" https://forums.alliedmods.net/showthread.php?p=1471473
{
    new userid = GetEventInt(event, "userid");
    new client = GetClientOfUserId(userid);
    
    if (client && GetClientTeam(client) > 1)
    {
        new Float:fDuration = GetEntPropFloat(client, Prop_Send, "m_flFlashDuration");
        CreateTimer(fDuration, RemoveRadar, client);
    }
}

CSSHideRadar(client)
{
    SetEntPropFloat(client, Prop_Send, "m_flFlashDuration", 3600.0);
    SetEntPropFloat(client, Prop_Send, "m_flFlashMaxAlpha", 0.5);
}
 
Сверху Снизу