First off all, efficiency !
You need to use a natives from get admin rights, like in amxmisc include.
Second, post the whole code using a [PHP] tag or [CODE] tag
For hook a say command you need to custom function, to hook the first char '.' and put as console command.
see the amxmodx documentation for more info, or look this: https://forums.alliedmods.net/showthread.php?t=207106