[Ajuda] Tiro na Skin
#1

Queria saber como configura,tem como fazer um mini tutorial para mim ,irei ficar mt agradecido! os codigos estao aqui

Код:
new Tiros[MAX_PLAYERS];
new Faleceu[MAX_PLAYERS];
 
public OnPlayerConnect(playerid)
{
        Tiros[playerid] = 0;
        Faleceu[playerid] = 0;
}
public OnPlayerGiveDamage(playerid,damagedid,Float:amount,weaponid)
{
            new Float:Vida;
            new Float:Colete;
            new Float:Dano;
            new Fala[20];
 
            if(weaponid == 16 || weaponid == 34 || weaponid == 35 || weaponid == 38)
            {
                ApplyAnimation(damagedid,"PED","DAM_STOMACH_FRMFT",4.1,0,1,1,0,0,1);
                Tiros[damagedid] = 0;
            }
            if(weaponid == 24 || weaponid == 25 || weaponid == 27)
            {
                Tiros[damagedid]++;
 
                if(Tiros[damagedid] > 4)
                {
                    ApplyAnimation(damagedid,"PED","DAM_STOMACH_FRMFT",4.1,0,1,1,0,0,1);
                    Tiros[damagedid] = 0;
                }
            }
            if(weaponid == 29 || weaponid == 30 || weaponid == 31)
            {
                Tiros[damagedid]++;
 
                if(Tiros[damagedid] > 9)
                {
                    ApplyAnimation(damagedid,"PED","DAM_STOMACH_FRMFT",4.1,0,1,1,0,0,1);
                    Tiros[damagedid] = 0;
                }
            }
            GetPlayerArmour(damagedid,Colete);
            GetPlayerHealth(damagedid,Vida);
 
            PlayerPlaySound(playerid,1131,0.0,0.0,0.0);
            PlayerPlaySound(damagedid,17802,0.0,0.0,0.0);
 
            format(Fala,sizeof(Fala),"~r~-%0.0f",amount/2);
            GameTextForPlayer(damagedid,Fala,1000,3);
 
            if(Colete > 0)
            {
                if(amount/2 > Colete)
                {
                    Dano = amount/2 - Colete;
                    Vida = Vida - Dano;
 
                    SetPlayerArmour(damagedid,0.0);
                    SetPlayerHealth(damagedid,Vida);
 
                    return 1;
                }
                Colete = Colete - amount/2;
                SetPlayerArmour(damagedid,Colete);
            }
            if(Colete < 1)
            {
                Vida = Vida - amount/2;
                SetPlayerHealth(damagedid,Vida);
 
                if(Vida < amount/2)
                {
                        ChamarDeath(damagedid,playerid,weaponid);
 
                        Faleceu[damagedid] = 1;
                        SetTimerEx("SairFalecer",1000,0,"i",damagedid);
                }
            }
            return 1;
}
SairFalecer(playerid);
 
public SairFalecer(playerid)
{
    Faleceu[playerid] = 0;
}
ChamarDeath(playerid,killerid,reason) // OBS: Colocado aqui para nгo dar erros com a identaзгo
{
    CallRemoteFunction("OnPlayerDeath","iii",playerid,killerid,reason);
    SetPlayerHealth(playerid,0.0);
}
Reply


Messages In This Thread
Tiro na Skin - by Caio_loco - 19.11.2013, 17:32

Forum Jump:


Users browsing this thread: 2 Guest(s)