OnPlayerTakeDamage

Ovaj callback se poziva kada igrac nacini stetu drugom.

Parametri:

(playerid, issuerid, Float:amount, weaponid, bodypart)
 * playerid	ID igraca koji je nacinio stetu.
 * issuerid	ID igraca nad kojim je nacinjena steta INVALID_PLAYER_ID ako je nacinio sam sebi.
 * amount	Kolicina stete nacinjena igracu.
 * weaponid	ID oruzija kojim je nacinjena steta
 * bodypart	Deo tela koji je pogodjen. (NAPOMENA: Ovaj parametar je dodan u verziji 0.3z i nemojte ga koristiti na ranijim!)


 * Return


 * 1 - Dopusta ovom callbacku da bude koristen drugde u skripti.
 * 0 - Nedopusta ovom callbacku da bude koristen dalje u skripti

Primer
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) {   if(issuerid != INVALID_PLAYER_ID) // Ako nije igrac nacinio sam sebi stetu {       new infoString[128], weaponName[24], victimName[MAX_PLAYER_NAME], attackerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, victimName, sizeof (victimName)); GetPlayerName(issuerid, attackerName, sizeof (attackerName)); GetWeaponName(weaponid, weaponName, sizeof (weaponName)); format(infoString, sizeof(infoString), "%s je nacinio %.0f stete igracu %s, oruzijem: %s", attackerName, amount, victimName, weaponName); SendClientMessageToAll(-1, infoString); }   return 1; }

Primer: Pogodak u glavu snajperom (0.3z)
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) {   if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9) {       // Jedan pogodak u glavu snajperom postavlja helte na 0 SetPlayerHealth(playerid, 0.0); }   return 1; } (PRIMER HEAD SHOT SISTEMA)