29.04.2018, 05:15
Quote:
you stupid or what?
first just think a little bit how coding works even |
Quote:
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamageActor
and https://sampwiki.blast.hk/wiki/Weapons The callback has a parameter weaponid. If the weapon is a car, the weaponid is 49. So, when a player does damage to an actor with a vehicle, the callback would give weaponid 49. You should be able to do that check and do whatever you want with that data. Is this what you are looking for? |
I've tried this:
Код:
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart) { if(weaponid == 49) { new string[128], attacker[MAX_PLAYER_NAME]; new weaponname[24]; GetPlayerName(playerid, attacker, sizeof (attacker)); GetWeaponName(weaponid, weaponname, sizeof (weaponname)); format(string, sizeof(string), "%s has made %.0f damage to actor id %d, weapon: %s", attacker, amount, damaged_actorid, weaponname); SendClientMessageToAll(0xFFFFFFFF, string); } return 1; }
Thank you @Zeus666, but just ignore, that guy clearly have problems.