SA-MP Forums Archive
[Pedido] Anti 2-2-2 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Anti 2-2-2 (/showthread.php?tid=373875)



Anti 2-2-2 - Crueliz0n - 31.08.2012

alguйm sabe alguma forma de criar um anti 2-2-2?


Re: Anti 2-2-2 - matheus280 - 31.08.2012

como assim? pra se repetir esse nъmero 3 vezes ele ser bloqueado?


Re: Anti 2-2-2 - Crueliz0n - 01.09.2012

Quote:
Originally Posted by matheus280
View Post
como assim? pra se repetir esse nъmero 3 vezes ele ser bloqueado?
nгo, й um bug/glitche usado na sawn-off (escopeta cano serrado)


Respuesta: Anti 2-2-2 - ipsBruno - 01.09.2012

Sу checar se tem 2 balas no slot atual da arma.


Re: Anti 2-2-2 - matheus280 - 01.09.2012

ae bruno, coloca brasil no lugar de desenvolvido 50% que teu serv vai bombar


Re: Respuesta: Anti 2-2-2 - Crueliz0n - 01.09.2012

Quote:
Originally Posted by ipsBruno
View Post
Sу checar se tem 2 balas no slot atual da arma.
com GetPlayerWeaponData?


Respuesta: Anti 2-2-2 - ipsBruno - 01.09.2012

Tenta isto, boa sorte.

pawn Code:
public OnPlayerUpdate(playerid) {


    static wepState ;

    wepState = GetPlayerWeaponState (playerid);

    if( WEAPONSTATE_LAST_BULLET  == wepState || wepState   == WEAPONSTATE_MORE_BULLETS || WEAPONSTATE_RELOADING  ==   wepState) {
        return true;
    }

    static wepId ;

    wepId = GetPlayerWeapon(playerid);
 
    if ( wepId  != SAWN_ OFFID ) {
        SetPVarInt( playerid, "lastWeapon", wepId );
        SetPVarInt( playerid, "lastTimewep", gettime() );
        return true;
    }

    else {



        if ( gettime() - GetPVarInt(playerid,"sawnoffPega") < 10 && gettime () - GetPVarInt( playerid, "lastTimewep") < 2 && GetPVarInt( playerid, "lastWeapon" ) !=  SAWN_ OFFID ) {
            SetPVarInt( playerid, "lastWeapon", SAWN_ OFFID);
            SetPVarInt( playerid, "lastTimewep", 0);
            return true;
        }
        SetPVarInt( playerid, "sawnoffPega", gettime());
    }


    return true ;
}



Re: Respuesta: Anti 2-2-2 - Crueliz0n - 01.09.2012

Quote:
Originally Posted by ipsBruno
View Post
Tenta isto, boa sorte.

pawn Code:
public OnPlayerUpdate(playerid) {


    static wepState ;

    wepState = GetPlayerWeaponState (playerid);

    if( WEAPONSTATE_LAST_BULLET  == wepState || wepState   == WEAPONSTATE_MORE_BULLETS || WEAPONSTATE_RELOADING  ==   wepState) {
        return true.
    }

    static wepId ;

    wepId = GetPlayerWeapon(playerid);
 
    if ( wepId  != SAWN_ OFFID ) {
        SetPVarInt( playerid, "lastWeapon", wepId );
        SetPVarInt( playerid, "lastTimewep", gettime() );
        return true;
    }

    else {
        if ( gettime () - GetPVarInt( playerid, "lastTimewep") < 2 && GetPVarInt( playerid, "lastWeapon" ) !=  SAWN_ OFFID ) {
            SetPVarInt( playerid, "lastWeapon", SAWN_ OFFID);
            SetPVarInt( playerid, "lastTimewep", 0);
            return true;
        }
    }


    return true ;
}
ok, vlws


Respuesta: Anti 2-2-2 - ipsBruno - 01.09.2012

Tem muitas outras condicionais a se fazer, isto vai detectar sу as vezes . Mas й sу uma base pra vocк.