[Pedido] Sniper 1 tiro colete e vida
#6

PHP код:
/*
    Distвncia >= 20
        - Colete != 0: zera o colete
        - Colete == 0: zera a vida
    Distвncia < 20
        - Colete != 0: nгo danifica
        - Colete == 0: tira 10 de vida.
*/
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if(
hittype == 1)
    {
        if(
weaponid == 34)
        {
            static
                
Float:health,
                
Float:armour;
            
GetPlayerHealth(hitidhealth);
            
GetPlayerArmour(hitidarmour);
            new 
Float:distance GetPlayerDistanceFromPoint(playeridfXfYfZ);
            if(
distance >= 20.0)
            {
                if(
armour
                {
                    
SetPlayerArmour(hitid0);
                }
                else
                {
                    
SetPlayerHealth(hitid0);
                }
            }
            else
            {
                if(!
armour)
                {
                    
SetPlayerHealth(hitid, (health 10));
                }
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Sniper 1 tiro colete e vida - by jefrens - 12.09.2015, 16:24
Re: Sniper 1 tiro colete e vida - by Wellington1999 - 12.09.2015, 16:35
Re: Sniper 1 tiro colete e vida - by jefrens - 12.09.2015, 17:30
Re: Sniper 1 tiro colete e vida - by zPain - 12.09.2015, 17:51
Re: Sniper 1 tiro colete e vida - by jefrens - 12.09.2015, 17:53
Re: Sniper 1 tiro colete e vida - by zPain - 12.09.2015, 17:59
Re: Sniper 1 tiro colete e vida - by jefrens - 12.09.2015, 18:13
Re: Sniper 1 tiro colete e vida - by zPain - 12.09.2015, 18:16
Re: Sniper 1 tiro colete e vida - by jefrens - 12.09.2015, 18:57

Forum Jump:


Users browsing this thread: 1 Guest(s)