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;
}
if(issuerid != INVALID_PLAYER_ID) return 0; // If issuerid is valid ID then it returns 0;
if(issuerid == INVALID_PLAYER_ID) return 0; // If issuerid is valid ID then it returns 0; You want to check if is valid, and if is return 0? Or to check is invalid to return 0? |
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(IsPlayerConnected(issuerid))
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;
}
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;
}