Raised This Month: $79 Target: $400
 19% 

Gamedata Hook AMX 1.9


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
colossus
Member
Join Date: Sep 2013
Old 05-15-2020 , 02:17   Gamedata Hook AMX 1.9
Reply With Quote #1

Hi, how to hook this

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>
#include <gameconfig>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "colossus"

new GameConfig:gameConfig
new HookGiveDefaultItems

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
    
gameConfig LoadGameConfigFile("modules.games/game.cstrike")
    
HookGiveDefaultItems GameConfGetOffset(gameConfig"GiveDefaultItems")
    
server_print("a%d b%d"gameConfigHookGiveDefaultItems)
}

public 
GiveDefaultItems(id) {
    
client_print(idprint_chat"Testtt")
    return 
PLUGIN_CONTINUE

Output:
a1 b-1

Last edited by colossus; 05-15-2020 at 02:20.
colossus is offline
rtxa
Member
Join Date: Mar 2018
Location: Argentina
Old 05-16-2020 , 01:26   Re: Gamedata Hook AMX 1.9
Reply With Quote #2

Quote:
Originally Posted by colossus View Post
Hi, how to hook this

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>
#include <gameconfig>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "colossus"

new GameConfig:gameConfig
new HookGiveDefaultItems

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
    
gameConfig LoadGameConfigFile("modules.games/game.cstrike")
    
HookGiveDefaultItems GameConfGetOffset(gameConfig"GiveDefaultItems")
    
server_print("a%d b%d"gameConfigHookGiveDefaultItems)
}

public 
GiveDefaultItems(id) {
    
client_print(idprint_chat"Testtt")
    return 
PLUGIN_CONTINUE

Output:
a1 b-1
Explain what you want to do, because you aren't hooking anything, you are just getting a value from a game file (in this case, an offset).
__________________
Hi, I make plugins for Half-Life, check them down here.
Zombie Mod X | HL Deathrun | AG Mod X
Football N' Guns | MiniVS - A Vampire Slayer Port
HL Player Models API | HL Semiclip | HL Restore Map API
Also check my maps: Enix | xbow_jump | fb_ukfootie2
rtxa is offline
colossus
Member
Join Date: Sep 2013
Old 05-21-2020 , 19:45   Re: Gamedata Hook AMX 1.9
Reply With Quote #3

bump
colossus is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-22-2020 , 08:46   Re: Gamedata Hook AMX 1.9
Reply With Quote #4

Someone asked you a question that you didn't respond to....
__________________
Bugsy is offline
colossus
Member
Join Date: Sep 2013
Old 05-29-2020 , 13:02   Re: Gamedata Hook AMX 1.9
Reply With Quote #5

hook givedefaultitems cssdk
colossus is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-29-2020 , 18:10   Re: Gamedata Hook AMX 1.9
Reply With Quote #6

Quote:
Originally Posted by rtxa View Post
Explain what you want to do, because you aren't hooking anything, you are just getting a value from a game file (in this case, an offset).
Quote:
Originally Posted by colossus View Post
hook givedefaultitems cssdk
Don't speak in code. Tell us what you are trying to do, not how you think it has to be done.
__________________

Last edited by Bugsy; 05-29-2020 at 18:11.
Bugsy is offline
Reply


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 21:00.


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