[AJUDA]Dano Arma
#2

Caro Manoloww,

Ultilize as novas funзхes do sa-mp! (nгo tгo novas,rs) Um bom exemplo de aumentar o dano das armas, que eu fiz para vocк:


pawn Код:
enum r_Damages{
    weaponID,
    weaponDamage
}
new rDamage[14][E_WeapInfo] = {

    {22,40},
    {23,40},
    {24,65},
    {25,45},
    {26,45},
    {27,50},
    {28,30},
    {29,30},
    {30,40},
    {31,40,
    {32,25},
    {33,100},
    {34,80},
    // Assim por diante, armaid , damage
};
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID) {
        new Float:Health, Float:newHealth;

        GetPlayerHealth(playerid, Health);
        newHealth = Health - weaponDamage[weaponid][weaponDamage];

        if(weaponid == SNIPER) {
            SetPlayerHealth(playerid, newHealth);
        }


    }
    return 1;
}

Espero ter ajudado , caso nгo funcione me comunique por MP!

Att,

Ricop522
Reply


Messages In This Thread
[AJUDA]Dano Arma - by Manoloww - 26.03.2012, 22:54
Re: [AJUDA]Dano Arma - by Ricop522 - 26.03.2012, 23:05
Re: [AJUDA]Dano Arma - by DarkScripter - 26.03.2012, 23:05
Re: [AJUDA]Dano Arma - by .FuneraL. - 26.03.2012, 23:36
Re: [AJUDA]Dano Arma - by DarkScripter - 26.03.2012, 23:41

Forum Jump:


Users browsing this thread: 2 Guest(s)