[Ajuda] aumentar dano de todas as armas
#3

pawn Код:
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;
}
pawn Код:
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;
}
https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
Reply


Messages In This Thread
aumentar dano de todas as armas - by yagomapper - 31.07.2013, 20:47
Re: aumentar dano de todas as armas - by FenixBorn - 31.07.2013, 21:54
Re: aumentar dano de todas as armas - by Mteck - 31.07.2013, 22:42
Re: aumentar dano de todas as armas - by -Rafinha_FusioN- - 01.08.2013, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)