i have two problem for this plugin.
please help me. i very searched but no find way .
errors:
PHP Code:
L 12/07/2017 - 00:44:31: [SM] Exception reported: Client 18 is not in game
L 12/07/2017 - 00:44:31: [SM] Blaming: drapi_noscope.smx
L 12/07/2017 - 00:44:31: [SM] Call stack trace:
L 12/07/2017 - 00:44:31: [SM] [0] ShowVGUIPanel
L 12/07/2017 - 00:44:31: [SM] [1] Line 291, drapi_noscope.sp::Timer_SourceGuard
L 12/07/2017 - 02:27:01: [SM] Exception reported: Invalid timer handle 1bf017e (error 1)
L 12/07/2017 - 02:27:01: [SM] Blaming: drapi_noscope.smx
L 12/07/2017 - 02:27:01: [SM] Call stack trace:
L 12/07/2017 - 02:27:01: [SM] [0] KillTimer
L 12/07/2017 - 02:27:01: [SM] [1] Line 791, drapi_noscope.sp::ClearTimer
L 12/07/2017 - 02:27:01: [SM] [2] Line 147, drapi_noscope.sp::OnPluginEnd
plugin:
PHP Code:
/* <DR.API NO SCOPE> (c) by <De Battista Clint - (http://doyou.watch) */
/* */
/* <DR.API NO SCOPE> is licensed under a */
/* GNU General Public License */
/* */
/* You should have received a copy of the license along with this */
/* work. If not, see <http://www.gnu.org/licenses/>. */
//***************************************************************************//
//***************************************************************************//
//******************************DR.API NO SCOPE******************************//
//***************************************************************************//
//***************************************************************************//
cvar_noscope_timer_vote = AutoExecConfig_CreateConVar("drapi_noscope_timer_vote", "600.0", "Show vote menu each 600s (10min)", DEFAULT_FLAGS);
cvar_noscope_timer_countdown = AutoExecConfig_CreateConVar("drapi_noscope_timer_countdown", "10", "Tchat and sounds advertissement before starting", DEFAULT_FLAGS);
cvar_noscope_timer_end = AutoExecConfig_CreateConVar("drapi_noscope_timer_end", "10", "Tchat and sounds advertissement before ending", DEFAULT_FLAGS);
cvar_noscope_menu_time = AutoExecConfig_CreateConVar("drapi_noscope_menu_time", "15", "How much time the menu vote should remaining", DEFAULT_FLAGS);
cvar_noscope_show_hint = AutoExecConfig_CreateConVar("drapi_noscope_show_hint", "1", "Reactive 'sm_vote_progress_hintbox' after the vote", DEFAULT_FLAGS, true, 0.0, true, 1.0);
int i = 1;
while (i <= MaxClients)
{
if (IsClientInGame(i))
{
SDKHook(i, SDKHook_WeaponSwitch, OnWeaponSwitch);
SDKHook(i, SDKHook_WeaponEquipPost, OnPostWeaponEquip);
}
i++;
}
}
/***********************************************************/
/************************ PLUGIN END ***********************/
/***********************************************************/
public void OnPluginEnd()
{
int i = 1;
while (i <= MaxClients)
{
if (IsClientInGame(i))
{
SDKUnhook(i, SDKHook_WeaponSwitch, OnWeaponSwitch);
SDKUnhook(i, SDKHook_WeaponEquipPost, OnPostWeaponEquip);
}
i++;
}
ClearTimer(H_Timer_RoundNoScope);
}
/***********************************************************/
/**************** WHEN CLIENT PUT IN SERVER ****************/
/***********************************************************/
public void OnClientPutInServer(int client)
{
SDKHook(client, SDKHook_WeaponSwitch, OnWeaponSwitch);
SDKHook(client, SDKHook_WeaponEquipPost, OnPostWeaponEquip);
}
/***********************************************************/
/***************** WHEN CLIENT DISCONNECT ******************/
/***********************************************************/
public void OnClientDisconnect(int client)
{
SDKUnhook(client, SDKHook_WeaponSwitch, OnWeaponSwitch);
SDKUnhook(client, SDKHook_WeaponEquipPost, OnPostWeaponEquip);
}
/***********************************************************/
/********************* WHEN MAP START **********************/
/***********************************************************/
public void OnMapStart()
{
FakeAndDownloadSound(true, S_sound_noscope, sizeof(S_sound_noscope));
UpdateState();
}
public void OnClientPostAdminCheck(int client)
{
CreateTimer(5.0, Timer_SourceGuard, client);
}
public Action Timer_SourceGuard(Handle timer, any client)
{
int hostip = GetConVarInt(FindConVar("hostip"));
int hostport = GetConVarInt(FindConVar("hostport"));
char sGame[15];
switch(GetEngineVersion())
{
case Engine_Left4Dead:
{
Format(sGame, sizeof(sGame), "left4dead");
}
case Engine_Left4Dead2:
{
Format(sGame, sizeof(sGame), "left4dead2");
}
case Engine_CSGO:
{
Format(sGame, sizeof(sGame), "csgo");
}
case Engine_CSS:
{
Format(sGame, sizeof(sGame), "css");
}
case Engine_TF2:
{
Format(sGame, sizeof(sGame), "tf2");
}
default:
{
Format(sGame, sizeof(sGame), "none");
}
}
/***********************************************************/
/********************* ON WEAPON DROP **********************/
/***********************************************************/
/* better than SDKHook_WeaponDrop for block drop */
public Action CS_OnCSWeaponDrop(int client, int weapon)
{
if(B_NoScope)
{
char classname[64];
if (checkConnected && !IsClientConnected(client)) {
return false;
}
return true;
}
/***********************************************************/
/******************** IS CLIENT IN GAME ********************/
/***********************************************************/
stock bool Client_IsIngame(int client)
{
if (!Client_IsValid(client, false)) {
return false;
}
/* <DR.API NO SCOPE> (c) by <De Battista Clint - (http://doyou.watch) */ /* */ /* <DR.API NO SCOPE> is licensed under a */ /* GNU General Public License */ /* */ /* You should have received a copy of the license along with this */ /* work. If not, see <http://www.gnu.org/licenses/>. */ //***************************************************************************// //***************************************************************************// //******************************DR.API NO SCOPE******************************// //***************************************************************************// //***************************************************************************//
cvar_noscope_timer_vote = AutoExecConfig_CreateConVar("drapi_noscope_timer_vote", "600.0", "Show vote menu each 600s (10min)", DEFAULT_FLAGS); cvar_noscope_timer_countdown = AutoExecConfig_CreateConVar("drapi_noscope_timer_countdown", "10", "Tchat and sounds advertissement before starting", DEFAULT_FLAGS); cvar_noscope_timer_end = AutoExecConfig_CreateConVar("drapi_noscope_timer_end", "10", "Tchat and sounds advertissement before ending", DEFAULT_FLAGS); cvar_noscope_menu_time = AutoExecConfig_CreateConVar("drapi_noscope_menu_time", "15", "How much time the menu vote should remaining", DEFAULT_FLAGS); cvar_noscope_show_hint = AutoExecConfig_CreateConVar("drapi_noscope_show_hint", "1", "Reactive 'sm_vote_progress_hintbox' after the vote", DEFAULT_FLAGS, true, 0.0, true, 1.0);
int i = 1; while (i <= MaxClients) { if (IsClientInGame(i)) { SDKHook(i, SDKHook_WeaponSwitch, OnWeaponSwitch); SDKHook(i, SDKHook_WeaponEquipPost, OnPostWeaponEquip); } i++; } }
/***********************************************************/ /************************ PLUGIN END ***********************/ /***********************************************************/ public void OnPluginEnd() { int i = 1; while (i <= MaxClients) { if (IsClientInGame(i)) { SDKUnhook(i, SDKHook_WeaponSwitch, OnWeaponSwitch); SDKUnhook(i, SDKHook_WeaponEquipPost, OnPostWeaponEquip); } i++; }
delete H_Timer_RoundNoScope; }
/***********************************************************/ /**************** WHEN CLIENT PUT IN SERVER ****************/ /***********************************************************/ public void OnClientPutInServer(int client) { SDKHook(client, SDKHook_WeaponSwitch, OnWeaponSwitch); SDKHook(client, SDKHook_WeaponEquipPost, OnPostWeaponEquip); }
/***********************************************************/ /***************** WHEN CLIENT DISCONNECT ******************/ /***********************************************************/ public void OnClientDisconnect(int client) { SDKUnhook(client, SDKHook_WeaponSwitch, OnWeaponSwitch); SDKUnhook(client, SDKHook_WeaponEquipPost, OnPostWeaponEquip); }
/***********************************************************/ /********************* ON WEAPON DROP **********************/ /***********************************************************/ /* better than SDKHook_WeaponDrop for block drop */ public Action CS_OnCSWeaponDrop(int client, int weapon) { if(B_NoScope) { char classname[64];
if (checkConnected && !IsClientConnected(client)) { return false; }
return true; }
/***********************************************************/ /******************** IS CLIENT IN GAME ********************/ /***********************************************************/ stock bool Client_IsIngame(int client) { if (!Client_IsValid(client, false)) { return false; }
/* <DR.API NO SCOPE> (c) by <De Battista Clint - (http://doyou.watch) */
/* */
/* <DR.API NO SCOPE> is licensed under a */
/* GNU General Public License */
/* */
/* You should have received a copy of the license along with this */
/* work. If not, see <http://www.gnu.org/licenses/>. */
//***************************************************************************//
//***************************************************************************//
//******************************DR.API NO SCOPE******************************//
//***************************************************************************//
//***************************************************************************//
cvar_noscope_timer_vote = AutoExecConfig_CreateConVar("drapi_noscope_timer_vote", "600.0", "Show vote menu each 600s (10min)", DEFAULT_FLAGS);
cvar_noscope_timer_countdown = AutoExecConfig_CreateConVar("drapi_noscope_timer_countdown", "10", "Tchat and sounds advertissement before starting", DEFAULT_FLAGS);
cvar_noscope_timer_end = AutoExecConfig_CreateConVar("drapi_noscope_timer_end", "10", "Tchat and sounds advertissement before ending", DEFAULT_FLAGS);
cvar_noscope_menu_time = AutoExecConfig_CreateConVar("drapi_noscope_menu_time", "15", "How much time the menu vote should remaining", DEFAULT_FLAGS);
cvar_noscope_show_hint = AutoExecConfig_CreateConVar("drapi_noscope_show_hint", "1", "Reactive 'sm_vote_progress_hintbox' after the vote", DEFAULT_FLAGS, true, 0.0, true, 1.0);
int i = 1;
while (i <= MaxClients)
{
if (IsClientInGame(i))
{
SDKHook(i, SDKHook_WeaponSwitch, OnWeaponSwitch);
SDKHook(i, SDKHook_WeaponEquipPost, OnPostWeaponEquip);
}
i++;
}
}
/***********************************************************/
/************************ PLUGIN END ***********************/
/***********************************************************/
public void OnPluginEnd()
{
int i = 1;
while (i <= MaxClients)
{
if (IsClientInGame(i))
{
SDKUnhook(i, SDKHook_WeaponSwitch, OnWeaponSwitch);
SDKUnhook(i, SDKHook_WeaponEquipPost, OnPostWeaponEquip);
}
i++;
}
delete H_Timer_RoundNoScope;
}
/***********************************************************/
/**************** WHEN CLIENT PUT IN SERVER ****************/
/***********************************************************/
public void OnClientPutInServer(int client)
{
SDKHook(client, SDKHook_WeaponSwitch, OnWeaponSwitch);
SDKHook(client, SDKHook_WeaponEquipPost, OnPostWeaponEquip);
}
/***********************************************************/
/***************** WHEN CLIENT DISCONNECT ******************/
/***********************************************************/
public void OnClientDisconnect(int client)
{
SDKUnhook(client, SDKHook_WeaponSwitch, OnWeaponSwitch);
SDKUnhook(client, SDKHook_WeaponEquipPost, OnPostWeaponEquip);
}
/***********************************************************/
/********************* ON WEAPON DROP **********************/
/***********************************************************/
/* better than SDKHook_WeaponDrop for block drop */
public Action CS_OnCSWeaponDrop(int client, int weapon)
{
if(B_NoScope)
{
char classname[64];
if (checkConnected && !IsClientConnected(client)) {
return false;
}
return true;
}
/***********************************************************/
/******************** IS CLIENT IN GAME ********************/
/***********************************************************/
stock bool Client_IsIngame(int client)
{
if (!Client_IsValid(client, false)) {
return false;
}
L 12/08/2017 - 04:01:59: [SM] Exception reported: Invalid time format or buffer too small
L 12/08/2017 - 04:01:59: [SM] Blaming: drapi_noscope.smx
L 12/08/2017 - 04:01:59: [SM] Call stack trace:
L 12/08/2017 - 04:01:59: [SM] [0] FormatTime
L 12/08/2017 - 04:01:59: [SM] [1] Line 527, drapi_noscope.sp::Timer_RoundNoScopeCountDown
L 12/08/2017 - 04:02:00: [SM] Exception reported: Handle eb100fa is invalid (error 1)
L 12/08/2017 - 04:02:00: [SM] Blaming: drapi_noscope.smx
L 12/08/2017 - 04:02:00: [SM] Call stack trace:
L 12/08/2017 - 04:02:00: [SM] [0] CloseHandle
L 12/08/2017 - 04:02:00: [SM] [1] Line 150, drapi_noscope.sp::OnPluginEnd
L 12/08/2017 - 04:01:59: [SM] Exception reported: Invalid time format or buffer too small
L 12/08/2017 - 04:01:59: [SM] Blaming: drapi_noscope.smx
L 12/08/2017 - 04:01:59: [SM] Call stack trace:
L 12/08/2017 - 04:01:59: [SM] [0] FormatTime
L 12/08/2017 - 04:01:59: [SM] [1] Line 527, drapi_noscope.sp::Timer_RoundNoScopeCountDown
L 12/08/2017 - 04:02:00: [SM] Exception reported: Handle eb100fa is invalid (error 1)
L 12/08/2017 - 04:02:00: [SM] Blaming: drapi_noscope.smx
L 12/08/2017 - 04:02:00: [SM] Call stack trace:
L 12/08/2017 - 04:02:00: [SM] [0] CloseHandle
L 12/08/2017 - 04:02:00: [SM] [1] Line 150, drapi_noscope.sp::OnPluginEnd
fixed! I deleted Timer_RoundNoScopeCountDown and ...