[Pedido] Super soco
#4

http://forum.sa-mp.com/showthread.ph...t=soco+drakins


pawn Code:
new
    Float: x,
    Float: y,
    Float: z,
    Keys,
    ud,
    lr,
    Float: health,
    Float: armour
;
public OnPlayerUpdate( playerid )
{
    GetPlayerKeys( playerid, Keys, ud, lr );
    if( Keys == KEY_FIRE && GetPlayerWeapon( playerid ) == 0 ) {
        for( new i=0; i < 500; i++ ) {
            if( IsPlayerConnected( i ) ) {
                GetPlayerPos( playerid, x, y, z );
                if( playerid != i ){
                    if( IsPlayerInRangeOfPoint( i, 1.5, x, y, z ) ) {
                        GetPlayerArmour( playerid, armour );
                        GetPlayerHealth( i, health );
                        if( armour > 0 ) {
                            SetPlayerArmour( i, armour-30 );
                            return false;
                        }
                        SetPlayerHealth( i, health-30 );
                    }
                }
            }
        }
    }
    return true;
}
Editado pra -30 *-*
Reply


Messages In This Thread
[Pedido] Super soco - by iacocesar123 - 14.05.2011, 17:41
Re: [Pedido] Super soco - by Carl_Thuse - 14.05.2011, 17:48
Re: [Pedido] Super soco - by The Knight - 14.05.2011, 17:54
Re: [Pedido] Super soco - by Macintosh - 14.05.2011, 17:58
Re: [Pedido] Super soco - by TheGarfield - 14.05.2011, 18:59

Forum Jump:


Users browsing this thread: 2 Guest(s)