Someone tell me what is wrong with this code is that sometimes when you are online more than 20 players, the server crashes. There are no errors and no data about this drop. Code is not mine , found on the Internet , slightly changed, namely HookEvent for DOD:S (Day of Defeat Source) changed : round_start = dod_round_start and round_end = dod_round_win . The code itself is working , but only these server crashes are already beginning to bother. The meaning of the plugin is not to be able to pick up any weapon from the ground after winning the round, in the DoD:s bonus round ..The code is below ..
#pragma semicolon 1
#pragma newdecls required
bool g_bBlock; // true blocking
public void OnPluginStart()
HookEvent("dod_round_start", Event_RoundStart, EventHookMode_PostNoCopy);
HookEvent("dod_round_win", Event_RoundEnd, EventHookMode_PostNoCopy);
public void OnClientPutInServer(int iClient)
SDKHook(iClient, SDKHook_WeaponCanUse, WeaponCanUse); // you unhooked
public void Event_RoundStart(Event hEvent, const char name, bool bDontBroadcast)
g_bBlock = false;
public void Event_RoundEnd(Event hEvent, const char name, bool bDontBroadcast)
g_bBlock = true;
public Action WeaponCanUse(int iClient, int iWeapon)
return g_bBlock ? Plugin_Handled : Plugin_Continue;
P.s.Server crash is because of this plugin , after installing it on the server.No plug-ins , except that were not put.And Sorry for Bad English...