Raised This Month: $51 Target: $400
 12% 

How to hook on late load? [Solved]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EngHell
Member
Join Date: Jul 2013
Location: Guatemala
Old 01-25-2015 , 15:29   How to hook on late load? [Solved]
Reply With Quote #1

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(clientSDKHook_WeaponCanUseBlockPickup);
}

public 
OnClientDisconnect(client) {
    
SDKUnhook(clientSDKHook_WeaponCanUseBlockPickup);

and

PHP Code:
public Action:BlockPickup(clientweapon){
    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?

Last edited by EngHell; 01-26-2015 at 00:02.
EngHell is offline
 



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


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