I have done this to hook the players picking items when theres a knife round, everything is working fine except it let players get droped items, but since i did a late load of the plugin, i think thats why it's not working, because i did the hook OnClientPutInServer() that is why the plugin is not working well, but since i ussually load and unload plugins every x time, i'll like to get a way to handle it, theres the code:
PHP Code:
public OnClientPutInServer(client) {
SDKHook(client, SDKHook_WeaponCanUse, BlockPickup);
}
public OnClientDisconnect(client) {
SDKUnhook(client, SDKHook_WeaponCanUse, BlockPickup);
}
and
PHP Code:
public Action:BlockPickup(client, weapon){
if (g_enabled && g_isKnifeRound) {
PrintHintText(client, "%t","Knife round is enabled");
return Plugin_Handled;
}
return Plugin_Continue;
}
How i can manage to hook it when i late load the plugin?