22.05.2017, 17:44
Hello there,
I've made one simple IF statement on OnPlayerTakeDamage callback.
The if statement is supposed to check if the issuerid (Who made the damage) is valid.
I've checked it many times, and I'm pretty sure that the code is correct.
Please, tell me what is the problem in this
I've made one simple IF statement on OnPlayerTakeDamage callback.
The if statement is supposed to check if the issuerid (Who made the damage) is valid.
PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID) return 0; // If issuerid is valid ID then it returns 0;
new string[128];
format(string, sizeof(string), "Damager: %d || Damaged: %d || bodypart: %d", issuerid, playerid, bodypart);
SCM(playerid, -1, string);
return 1;
}
Please, tell me what is the problem in this