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); }
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); }
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); }
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 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); }
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); }
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); }
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); }
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); }
public IVoiceChannel CreateVoiceChannel(bool spatial, float maxDistance) { voiceChannelPool.Create(AltNative.Server.Server_CreateVoiceChannel(NativePointer, spatial, maxDistance), out var voiceChannel); return(voiceChannel); }
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); }
public void OnCreateCheckpoint(IntPtr checkpointPointer) { CheckpointPool.Create(checkpointPointer); }
public void OnCreateBlip(IntPtr blipPointer) { BlipPool.Create(blipPointer); }
public void OnCreateVoiceChannel(IntPtr channelPointer) { VoiceChannelPool.Create(channelPointer); }