отлично работает.Друзья, у кого 3 ядро. У вас модуль нормально работает? ксго
Все работает, ошибки есть какие нибудь?Приветствую! подскажите, не работает антифлеш, можно ли как то это исправить , модуль отключить или удалить , будет ли работать?!
#include <sourcemod>
#include <vip_core>
#include <blindhook>
static const char g_sFeature[] = "AntiFlash";
public void OnPluginStart()
{
if(VIP_IsVIPLoaded())
VIP_OnVIPLoaded();
}
public void VIP_OnVIPLoaded()
{
VIP_RegisterFeature(g_sFeature, BOOL);
}
public void OnPluginEnd()
{
if(CanTestFeatures() && GetFeatureStatus(FeatureType_Native, "VIP_UnregisterFeature") == FeatureStatus_Available)
VIP_UnregisterFeature(g_sFeature);
}
public Action CS_OnBlindPlayer(int iClient, int iAttacker, int iInflictor)
{
return VIP_IsClientFeatureUse(iClient, g_sFeature) && IsClientInGame(iAttacker) && GetClientTeam(iClient) == GetClientTeam(iAttacker) ? Plugin_Stop:Plugin_Continue;
}
@Drumanid, Можно сделать, что-бы слепило от своей флешки?
public Action CS_OnBlindPlayer(int iClient, int iAttacker, int iInflictor)
{
return VIP_IsClientFeatureUse(iClient, g_sFeature) && IsClientInGame(iAttacker) && GetClientTeam(iClient) == GetClientTeam(iAttacker) ? Plugin_Stop:Plugin_Continue;
}
public Action CS_OnBlindPlayer(int iClient, int iAttacker, int iInflictor)
{
return VIP_IsClientFeatureUse(iClient, g_sFeature) && IsClientInGame(iAttacker) && iAttacker != iClient && GetClientTeam(iClient) == GetClientTeam(iAttacker) ? Plugin_Stop:Plugin_Continue;
}
А у бота есть вип статус?
Глупый вопрос, с 2 часов ночи не сплю. С игроком проверь.
L 05/25/2020 - 12:17:55: SourceMod error session started
L 05/25/2020 - 12:17:55: Info (map "de_dust2") (file "/home/server1518/game/cstrike/addons/sourcemod/logs/errors_20200525.log")
L 05/25/2020 - 12:17:55: [SM] Exception reported: Client 10 is not connected/Игрок 10 не подключен
L 05/25/2020 - 12:17:55: [SM] Blaming: vip/VIP_Core.smx
L 05/25/2020 - 12:17:55: [SM] Call stack trace:
L 05/25/2020 - 12:17:55: [SM] [0] ThrowNativeError
L 05/25/2020 - 12:17:55: [SM] [1] Line 1263, vip/API.sp::CheckValidClient
L 05/25/2020 - 12:17:55: [SM] [2] Line 1022, vip/API.sp::Native_GetClientFeatureInt
L 05/25/2020 - 12:17:55: [SM] [4] VIP_GetClientFeatureInt
L 05/25/2020 - 12:17:55: [SM] [5] Line 79, VIP_AntiFlash_1.0.0.sp::Timer_PlayerBlind
if(IsClientInGame(iClient))
public Action:Timer_PlayerBlind(Handle:hTimer, any:iClient)
{
if(IsClientInGame(iClient))
if(g_iOwner > 0 && IsClientInGame(g_iOwner))
{
if(iClient == g_iOwner && g_bSelfBlind)
{
return Plugin_Stop;
}
if(VIP_GetClientFeatureInt(iClient, VIP_ANTI_FLASH) == 2 || GetClientTeam(g_iOwner) == GetClientTeam(iClient))
{
SetEntDataFloat(iClient, m_flFlashDuration, 0.0);
SetEntDataFloat(iClient, m_flFlashMaxAlpha, 0.0);
ClientCommand(iClient, "dsp_player 0.0");
}
}
return Plugin_Stop;
}
@R1KO поправишь?
C-подобный:L 05/25/2020 - 12:17:55: SourceMod error session started L 05/25/2020 - 12:17:55: Info (map "de_dust2") (file "/home/server1518/game/cstrike/addons/sourcemod/logs/errors_20200525.log") L 05/25/2020 - 12:17:55: [SM] Exception reported: Client 10 is not connected/Игрок 10 не подключен L 05/25/2020 - 12:17:55: [SM] Blaming: vip/VIP_Core.smx L 05/25/2020 - 12:17:55: [SM] Call stack trace: L 05/25/2020 - 12:17:55: [SM] [0] ThrowNativeError L 05/25/2020 - 12:17:55: [SM] [1] Line 1263, vip/API.sp::CheckValidClient L 05/25/2020 - 12:17:55: [SM] [2] Line 1022, vip/API.sp::Native_GetClientFeatureInt L 05/25/2020 - 12:17:55: [SM] [4] VIP_GetClientFeatureInt L 05/25/2020 - 12:17:55: [SM] [5] Line 79, VIP_AntiFlash_1.0.0.sp::Timer_PlayerBlind
поискал в гугле,так понимаю нужно добавить проверку,в игре ли игрок
Добавить:Сделал следующим образом,правильно ли?C-подобный:if(IsClientInGame(iClient))
P.S в скриптинге я полный 0))
public Action:Timer_PlayerBlind(Handle:hTimer, any:iClient)
{
if(g_iOwner > 0 && IsClientInGame(g_iOwner) && IsClientInGame(iClient))
{
if(iClient == g_iOwner && g_bSelfBlind )
{
return Plugin_Stop;
}
if(VIP_GetClientFeatureInt(iClient, VIP_ANTI_FLASH) == 2 || GetClientTeam(g_iOwner) == GetClientTeam(iClient))
{
SetEntDataFloat(iClient, m_flFlashDuration, 0.0);
SetEntDataFloat(iClient, m_flFlashMaxAlpha, 0.0);
ClientCommand(iClient, "dsp_player 0.0");
}
}
return Plugin_Stop;
}