Fist / Melee damage

fsociety_

Известный
Автор темы
56
6
I noticed that the damage done by fists or melee weapons such as bats, shovels, nightstick etc.. are not logged through onBulletSync so any suggestions, what can i do ?
 

XRLM

Против ветра рождённый
Проверенный
1,516
1,107
Send PlayerSync keys + GiveDamage
 

XRLM

Против ветра рождённый
Проверенный
1,516
1,107
The damage detection radius can be limited to 1 meter. you also need to send keystroke synchronization
 

XRLM

Против ветра рождённый
Проверенный
1,516
1,107
idk. if your damage is not registered, then his damage will not be either
 

MrCreepTon

Неизвестный
Всефорумный модератор
2,212
5,021
I tried logging onSendTakeDamage, it's not outputting anything. I find it weird because when other players punch me it logs like normally
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
 
  • Нравится
Реакции: whyega52

fsociety_

Известный
Автор темы
56
6
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
No yeah i understand I'm trying to log the damage done to me by other players, but the issue is onSendTakeDamage isn't logging the damage if the damage is sent using sampSendGiveDamage i tested it using melee weapons. Any ideas why?
 

MrCreepTon

Неизвестный
Всефорумный модератор
2,212
5,021
No yeah i understand I'm trying to log the damage done to me by other players, but the issue is onSendTakeDamage isn't logging the damage if the damage is sent using sampSendGiveDamage i tested it using melee weapons. Any ideas why?
Because melee weapons are processed by GTA on target PC (also rocket launchers, bombs and other). You should get damage from another ped directly which cause GTA function which cause SA:MP take damage function. To solve this problem, you should simulate left mouse button and stay near target to simulate beat. Interesting fact: in this case you can to not send GiveDamage, with high probability take damage will be called.

But this works if SA:MP server is fully clear. If server has anti godmode system (or just custom damage system) SendDamage can cause damage of target (server will call SetPlayerHealth for target).
 

fsociety_

Известный
Автор темы
56
6
Because melee weapons are processed by GTA on target PC (also rocket launchers, bombs and other). You should get damage from another ped directly which cause GTA function which cause SA:MP take damage function. To solve this problem, you should simulate left mouse button and stay near target to simulate beat. Interesting fact: in this case you can to not send GiveDamage, with high probability take damage will be called.

But this works if SA:MP server is fully clear. If server has anti godmode system (or just custom damage system) SendDamage can cause damage of target (server will call SetPlayerHealth for target).

If the melee weapons are processed by GTA on target PC, does that mean if a player sends the damage to me using sampSendGiveDamage(myid, 1.32, 0, 3) there's no way for me to log that someone punched me? Because that's directly telling the server that he damaged me. The server i play on does have custom damage system yes
 
  • Нравится
Реакции: Mirai_Kuriyama