25.11.2017, 12:57
My bad invulnerable is false.
But still not called, I created a debug command which would return actors status and this is what i got
Now the part under OnPlayerGiveDamageActor is still not being called even after I attack actor
But still not called, I created a debug command which would return actors status and this is what i got
pawn Код:
CMD:checkactor(playerid, params[]) {
if(IsValidActor(cityActor)) {
print("created");
if(IsActorInvulnerable(cityActor)) {
print("undestroyable");
}
else {
print("destroyable");
}
}
else {
print("not created");
}
return true;
}
// callback
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart) {
printf("callback normal called.");
if(damaged_actorid == cityActor && IsValidActor(cityActor)) {
print("actor attached");
}
return true;
}
// result
[14:52:13] created
[14:52:13] destroyable