View Single Post
rtxa
Senior 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).
__________________
rtxa is offline