1 #include <amxmodx> 2 #include <fakemeta> 3 4 public plugin_init() 5 { 6 register_plugin("Chat Hook", "1.0", "crsky") 7 8 register_forward(FM_ClientCommand, "fw_ClientCommand") 9 } 10 11 public fw_ClientCommand(iPlayer) 12 { 13 new szCmd[32], szParam[32] 14 15 read_argv(0, szCmd, sizeof szCmd) 16 read_argv(1, szParam, sizeof szParam) 17 18 if(!strcmp(szCmd, "say")) 19 { 20 new szName[32] 21 get_user_name(iPlayer, szName, sizeof szName) 22 23 client_print(0, print_chat, "[%s] %s", szParam) 24 return FMRES_SUPERCEDE 25 } 26 27 return FMRES_IGNORED 28 }
效果:
时间: 2024-10-23 01:49:54