takeDamage and giveDamage differs. If you want log your hits to other pIayers you should use onSendGiveDamage.
In your case you need get damage value to prevent ac detect. After this in Moonloader you can use
sampSendGiveDamage
Keep in mind that on lower level takeDamage and giveDamage differs only 1 byte and have same rpc id (RPC_GIVETAKEDAMAGE). More info about rpc you can get
here