[Include] BlockWeaponsInInterior
#1

Diferente de AllowInteriorWeapons, BlockWeaponsInInterior bloqueia armas no interior que desejar.

Exemplo:
pawn Код:
main() {
    BlockWeaponsInInterior(true, 2, 3, 5);
}
*Le cуdigo*
pawn Код:
#define MAX_INTS 18

new Interiors[MAX_INTS char];

BlockWeaponsInInterior(bool:block, ...) {
    for(new i = numargs(); i > 1; --i) {
        Interiors{getarg(i)} = _:block;
    }
}

public OnPlayerUpdate(playerid) {
    if(Interiors{GetPlayerInterior(playerid)}) {
        SetPlayerArmedWeapon(playerid, 0);
    }
    return CallLocalFunction("OnPlayerUpdateEx", "i", playerid);
}

#if defined _ALS_OnPlayerUpdate
    #undef OnPlayerUpdate
#else
    #define _ALS_OnPlayerUpdate
#endif
#define OnPlayerUpdate OnPlayerUpdateEx
OnPlayerUpdateEx(playerid);
Fiz em 1min, nem testei direito, qualquer bug, avisar.

FellLikeASir_.
Reply


Messages In This Thread
BlockWeaponsInInterior - by FeelLikeASir_ - 25.08.2012, 22:44
Respuesta: BlockWeaponsInInterior - by Luciano* - 25.08.2012, 23:15
Re: BlockWeaponsInInterior - by Tony_Rodrigues - 25.08.2012, 23:22
Re: BlockWeaponsInInterior - by leonardo1434 - 25.08.2012, 23:34
Re: BlockWeaponsInInterior - by jpeg - 25.08.2012, 23:43
Re: Respuesta: BlockWeaponsInInterior - by FeelLikeASir_ - 25.08.2012, 23:50
Re: BlockWeaponsInInterior - by Juninho_Oakley - 26.08.2012, 00:14
Respuesta: BlockWeaponsInInterior - by ipsBruno - 26.08.2012, 01:22
Re: Respuesta: BlockWeaponsInInterior - by FeelLikeASir_ - 26.08.2012, 01:32
Re: BlockWeaponsInInterior - by paulor - 26.08.2012, 14:22

Forum Jump:


Users browsing this thread: 2 Guest(s)