28.09.2013, 18:18
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid) {
if(issuerid == INVALID_PLAYER_ID) return 1;
if(GetPVarInt(playerid, "TakeDamageMsg") >= gettime()) return 1;
new plid, 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 feriu %s com um(a) %s e rancou dele %.0f de vida. ", attackerName, victimName, weaponName, amount);
SendClientMessage(playerid, branco, infoString);
format(infoString, sizeof(infoString), "» %s feriu %s com um(a) %s e rancou dele %.0f de vida. ", attackerName, victimName, weaponName, amount);
SendClientMessage(plid, branco, infoString);
SetPVarInt(playerid, "TakeDamageMsg", (gettime() + 30));
return 1;
}