コード例 #1
0
        public static void SetCanAttackFriendlies(this Ped ped, FirendlyFireType type)
        {
            switch (type)
            {
            case FirendlyFireType.CantAttack:
                Function.Call((Hash) - 5498390243159980195L, new InputArgument[3]
                {
                    InputArgument.op_Implicit(((Entity)ped).get_Handle()),
                    InputArgument.op_Implicit(false),
                    InputArgument.op_Implicit(false)
                });
                break;

            case FirendlyFireType.CanAttack:
                Function.Call((Hash) - 5498390243159980195L, new InputArgument[3]
                {
                    InputArgument.op_Implicit(((Entity)ped).get_Handle()),
                    InputArgument.op_Implicit(true),
                    InputArgument.op_Implicit(false)
                });
                break;
            }
        }
コード例 #2
0
        public static void SetCanAttackFriendlies(this Ped ped, FirendlyFireType type)
        {
            switch (type)
            {
            case FirendlyFireType.CanAttack:
                Function.Call(GTA.Native.Hash.SET_CAN_ATTACK_FRIENDLY, (InputArgument[])new InputArgument[3]
                {
                    ped.Handle,
                    true,
                    false
                });
                break;

            case FirendlyFireType.CantAttack:
                Function.Call(GTA.Native.Hash.SET_CAN_ATTACK_FRIENDLY, (InputArgument[])new InputArgument[3]
                {
                    ped.Handle,
                    false,
                    false
                });
                break;
            }
        }