Exemple #1
0
        public IVoiceChannel CreateVoiceChannel(bool spatial, float maxDistance)
        {
            var ptr = MockEntities.GetNextPtrNoId();

            voiceChannelPool.Create(ptr, out var voiceChannel);
            if (voiceChannel is MockVoiceChannel mockVoiceChannel)
            {
                mockVoiceChannel.IsSpatial   = spatial;
                mockVoiceChannel.MaxDistance = maxDistance;
            }
            Alt.Module.OnCreateVoiceChannel(ptr);
            return(voiceChannel);
        }
Exemple #2
0
        public IBlip CreateBlip(IPlayer player, byte type, Position pos)
        {
            var ptr = MockEntities.GetNextPtrNoId();

            blipPool.Create(ptr, out var blip);
            if (blip is MockBlip mockBlip)
            {
                mockBlip.Position = pos;
                mockBlip.BlipType = type;
            }
            Alt.Module.OnCreateBlip(ptr);
            return(blip);
        }
        public IBlip CreateBlip(IPlayer player, byte type, Position pos)
        {
            var ptr  = MockEntities.GetNextPtrNoId();
            var blip = blipPool.Create(this, ptr);

            if (blip is MockBlip mockBlip)
            {
                mockBlip.Position = pos;
                mockBlip.BlipType = type;
            }
            Alt.CoreImpl.OnCreateBlip(ptr);
            return(blip);
        }
Exemple #4
0
        public IBlip CreateBlip(IPlayer player, byte type, IEntity entityAttach)
        {
            var ptr = MockEntities.GetNextPtrNoId();

            blipPool.Create(ptr, out var blip);
            if (blip is MockBlip mockBlip)
            {
                mockBlip.BlipType   = type;
                mockBlip.IsAttached = true;
                mockBlip.AttachedTo = entityAttach;
            }
            Alt.Module.OnCreateBlip(ptr);
            return(blip);
        }
Exemple #5
0
        public ICheckpoint CreateCheckpoint(IPlayer player, byte type, Position pos, float radius, float height,
                                            Rgba color)
        {
            var ptr = MockEntities.GetNextPtrNoId();

            checkpointPool.Create(ptr, out var checkpoint);
            if (checkpoint is MockCheckpoint mockCheckpoint)
            {
                mockCheckpoint.Position       = pos;
                mockCheckpoint.CheckpointType = type;
                mockCheckpoint.Radius         = radius;
                mockCheckpoint.Height         = height;
                mockCheckpoint.Color          = color;
            }
            Alt.Module.OnCreateCheckpoint(ptr);
            return(checkpoint);
        }