may i get an idea of how to do it i find nothing for actors
im also having another problem thats pissing me off
im gettin tag mismatch onplayergivedamageactor i just copied the code from samp wiki
Код:
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
{
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);
if(!IsActorInvulnerable(damaged_actorid)) //Check if actor is vulnerable
{
new Float:health;
GetActorHealth(damaged_actorid, health); //Get current health
SetActorHealth(damaged_actorid, health-amount); //Apply damage, set new health
}
return 1;
}
source of code:
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamageActor
error and warnings
error 035: argument type mismatch (argument 2)
warning 213: tag mismatch
warning 213: tag mismatch
on these lines
GetActorHealth(damaged_actorid, health); //Get current health
SetActorHealth(damaged_actorid, health-amount); //Apply damage, set new health
what am i doing wrong i already got an actor in there