Raised This Month: $62 Target: $400

DOD:S WeaponCanUse Server crashes

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Join Date: May 2018
Old 05-13-2019 , 12:16   DOD:S WeaponCanUse Server crashes
Reply With Quote #1

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 ..

PHP Code:
#include <sdkhooks>

#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);

void OnClientPutInServer(int iClient)
SDKHook(iClientSDKHook_WeaponCanUseWeaponCanUse); // you unhooked

void Event_RoundStart(Event hEvent, const char[] namebool bDontBroadcast)
g_bBlock false;

void Event_RoundEnd(Event hEvent, const char[] namebool bDontBroadcast)
g_bBlock true;

Action WeaponCanUse(int iClientint iWeapon)
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...

Last edited by mewbie222; 05-13-2019 at 12:30.
mewbie222 is offline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 11:41.

Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode