- Код: Выделить всё
L 06/07/2017 - 15:51:51: [SM] Native "IsClientInGame" reported: Client index 19 is invalid
L 06/07/2017 - 15:51:51: [SM] Displaying call stack trace for plugin "no_spec_flash.smx":
L 06/07/2017 - 15:51:51: [SM] [0] Line 35, D:\Games\Server\cstrike\addons\sourcemod\scripting\noteamflash.sp::TIMER_player_blind()
L 06/07/2017 - 16:07:19: Error log file session closed.
- Код: Выделить всё
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#pragma tabsize 0
#define PLUGIN_VERSION "1.2"
new g_iClient;
public OnPluginStart()
{
HookEvent("flashbang_detonate", flashbang_detonate, EventHookMode_Pre);
HookEvent("player_blind", player_blind, EventHookMode_Post);
}
public Action:flashbang_detonate(Handle:event, const String:name[], bool:silent)
{
g_iClient = GetClientOfUserId(GetEventInt(event, "userid"));
return Plugin_Continue;
}
public player_blind(Handle:event, const String:name[], bool:silent)
{
CreateTimer(0.01, TIMER_player_blind, GetEventInt(event, "userid"));
}
public Action:TIMER_player_blind(Handle:timer, any:client)
{
//new teamplayer = GetClientTeam(client) == 1;
//if ( IsClientInGame(client) && !IsPlayerAlive(client) || GetClientTeam(client) == teamplayer)
//{
if (g_iClient && IsClientInGame(client) && !IsPlayerAlive(client) && GetClientTeam(client) == 1)
{
SetEntPropFloat(client, Prop_Send, "m_flFlashDuration", 0.0);
SetEntPropFloat(client, Prop_Send, "m_flFlashMaxAlpha", 0.0);
//SetEntProp(client, Prop_Send, "m_flFlashMaxAlpha", 0.0);
//SetEntProp(client, Prop_Send, "m_flFlashDuration", 0.0);
ClientCommand(client, "dsp_player 0.0");
}
return Plugin_Stop;
}
Название темы скорректировано (Вы должны зарегистрироваться, чтобы видеть ссылки.) // Subb98
Добавлено спустя 19 минут 47 секунд:
Лучше бы помогли, чем темы постоянно менять.