19.08.2013, 09:55
Alguem sabe comando quando um player atira no otro ai fala a sim Ex: Player Zezinho Atirou em vocк com uma AK-47 e dechou com 70 de vida.
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID) // If not self-inflicted
{
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 has made %.0f damage to %s, weapon: %s", attackerName, amount, victimName, weaponName);
SendClientMessageToAll(-1, infoString);
}
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID && weaponid == 34)
{
// One shot to kill with sniper rifle
SetPlayerHealth(playerid, 0.0);
}
return 1;
}
SendClientMessage(playerid, 0xFF0000FF, "Perdeu vacilгo, levou um tiro de Sniper");
SendClientMessage(issuerid, 0x00FF00FF, "Boa mano, acertou uma Snipada na cara dele.");
format(infoString, sizeof(infoString), "%s has made %.0f damage to %s, weapon: %s", attackerName, amount, victimName, weaponName);
format(infoString, sizeof(infoString), "%s causou %.0f de dano para %s, arma: %s", attackerName, amount, victimName, weaponName);