Esempio n. 1
0
        public IColShape CreateColShapeCylinder(Position pos, float radius, float height)
        {
            CheckIfCallIsValid();
            var ptr = AltNative.Server.Server_CreateColShapeCylinder(NativePointer, pos, radius, height);

            if (ptr == IntPtr.Zero)
            {
                return(null);
            }
            colShapePool.Create(ptr, out var colShape);
            return(colShape);
        }
Esempio n. 2
0
        public IBlip CreateBlip(IPlayer player, byte type, Position pos)
        {
            CheckIfCallIsValid();
            var ptr = AltNative.Server.Server_CreateBlip(NativePointer, player?.NativePointer ?? IntPtr.Zero,
                                                         type, pos);

            if (ptr == IntPtr.Zero)
            {
                return(null);
            }
            blipPool.Create(ptr, out var blip);
            return(blip);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
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);
        }
Esempio n. 5
0
 public ICheckpoint CreateCheckpoint(IPlayer player, byte type, Position pos, float radius, float height,
                                     Rgba color)
 {
     checkpointPool.Create(AltNative.Server.Server_CreateCheckpoint(NativePointer,
                                                                    player?.NativePointer ?? IntPtr.Zero,
                                                                    type, pos, radius, height, color), out var checkpoint);
     return(checkpoint);
 }
Esempio n. 6
0
        public IVoiceChannel CreateVoiceChannel(bool spatial, float maxDistance)
        {
            CheckIfCallIsValid();
            var ptr = AltNative.Server.Server_CreateVoiceChannel(NativePointer,
                                                                 spatial, maxDistance);

            if (ptr == IntPtr.Zero)
            {
                return(null);
            }
            voiceChannelPool.Create(ptr, out var voiceChannel);
            return(voiceChannel);
        }
Esempio n. 7
0
        public ICheckpoint CreateCheckpoint(byte type, Position pos, float radius, float height,
                                            Rgba color)
        {
            CheckIfCallIsValid();
            var ptr = AltNative.Server.Server_CreateCheckpoint(NativePointer, type, pos, radius, height, color);

            if (ptr == IntPtr.Zero)
            {
                return(null);
            }
            checkpointPool.Create(ptr, out var checkpoint);
            return(checkpoint);
        }
Esempio n. 8
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);
        }
Esempio n. 9
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);
        }
Esempio n. 10
0
 public IVoiceChannel CreateVoiceChannel(bool spatial, float maxDistance)
 {
     voiceChannelPool.Create(AltNative.Server.Server_CreateVoiceChannel(NativePointer,
                                                                        spatial, maxDistance), out var voiceChannel);
     return(voiceChannel);
 }
Esempio n. 11
0
 public IBlip CreateBlip(IPlayer player, byte type, Position pos)
 {
     blipPool.Create(AltNative.Server.Server_CreateBlip(NativePointer, player?.NativePointer ?? IntPtr.Zero,
                                                        type, pos), out var blip);
     return(blip);
 }
Esempio n. 12
0
 public void OnCreateCheckpoint(IntPtr checkpointPointer)
 {
     CheckpointPool.Create(checkpointPointer);
 }
Esempio n. 13
0
 public void OnCreateBlip(IntPtr blipPointer)
 {
     BlipPool.Create(blipPointer);
 }
Esempio n. 14
0
 public void OnCreateVoiceChannel(IntPtr channelPointer)
 {
     VoiceChannelPool.Create(channelPointer);
 }