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

[TUT] Registering hams on bots.


Post New Thread Reply   
 
Thread Tools Display Modes
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 03-30-2017 , 20:39   Re: [TUT] Registering hams on bots.
Reply With Quote #11

Quote:
Originally Posted by PRoSToTeM@ View Post
You should hook PvAllocEntPrivateData call from gamedll, check the passed entity for bot and register ham on it. But you can't hook it with amxx, so then you should hook GetInfoKeyBuffer, it is first engine function called after PvAllocEntPrivateData on bot creating.

That is my old code for this:
PHP Code:
#include <amxmodx>
#include <fakemeta>

new g_iFakeClientByGameDll;

new 
g_fwdCreateFakeClient_Post;
new 
g_fwdGetInfoKeyBuffer;

public 
plugin_init() {
    
g_fwdCreateFakeClient_Post register_forward(FM_CreateFakeClient"CreateFakeClient_Post"true);
    
g_fwdGetInfoKeyBuffer register_forward(FM_GetInfoKeyBuffer"GetInfoKeyBuffer");
}

public 
CreateFakeClient_Post() {
    new 
iEntity get_orig_retval();
    
    if (!
pev_valid(iEntity)) {
        return;
    }
    
    
g_iFakeClientByGameDll iEntity;
}

public 
GetInfoKeyBuffer(const iEntity) {
    if (!
g_iFakeClientByGameDll) {
        return;
    }
    
    
g_iFakeClientByGameDll 0;
    
    
unregister_forward(FM_CreateFakeClientg_fwdCreateFakeClient_Posttrue);
    
unregister_forward(FM_GetInfoKeyBufferg_fwdGetInfoKeyBuffer);
    
    new 
iRet;
    new 
fwd CreateMultiForward("CSBot_Init"ET_IGNOREFP_CELL);
    
ExecuteForward(fwdiRetiEntity);
    
DestroyForward(fwd);

Only now I see that, about what you are talking?
__________________








CrazY. is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 03-31-2017 , 10:18   Re: [TUT] Registering hams on bots.
Reply With Quote #12

About your first post.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 03-31-2017 , 10:46   Re: [TUT] Registering hams on bots.
Reply With Quote #13

Ok... now I understand. Idk if have players that apply your method because have some guys that dont like fakemeta include. I only think...
__________________









Last edited by CrazY.; 03-31-2017 at 18:17.
CrazY. is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-31-2017 , 10:59   Re: [TUT] Registering hams on bots.
Reply With Quote #14

Quote:
Originally Posted by CrazY. View Post
Ok... now I understand. Idk if have players that apply your method because have people that dont like fakemeta include. I only think...
"People" don't like fakemeta_util, not fakemeta. I think someone already told you that.
__________________
HamletEagle is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 03-31-2017 , 18:15   Re: [TUT] Registering hams on bots.
Reply With Quote #15

Yes Hamlet, you are correct, my bad.
__________________








CrazY. is offline
Reply



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 17:56.


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