Add changes
This commit is contained in:
@@ -14,6 +14,8 @@ namespace ReallifeGamemode.Server.Core.RageMP
|
||||
|
||||
public IMarkerAPI Marker => new RageMarkerAPI();
|
||||
|
||||
public ITextLabelAPI TextLabel => new RageTextLabelAPI();
|
||||
|
||||
public void DisableDefaultCommandErrorMessages()
|
||||
{
|
||||
NAPI.Server.SetCommandErrorMessage(null);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Server.Core.API;
|
||||
using ReallifeGamemode.Server.Core.API.API;
|
||||
|
||||
@@ -10,12 +11,14 @@ namespace ReallifeGamemode.Server.Core.RageMP
|
||||
{
|
||||
public IColShape CreateCyclinder(Position position, float height, float range)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var colShape = NAPI.ColShape.CreateCylinderColShape(position.ToVector3(), range, height);
|
||||
return new RageColShape(colShape);
|
||||
}
|
||||
|
||||
public IColShape CreateSphere(Position position, float range)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var colShape = NAPI.ColShape.CreateSphereColShape(position.ToVector3(), range);
|
||||
return new RageColShape(colShape);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
20
ReallifeGamemode.Server.Core.RageMP/RageTextLabel.cs
Normal file
20
ReallifeGamemode.Server.Core.RageMP/RageTextLabel.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Server.Core.API;
|
||||
|
||||
namespace ReallifeGamemode.Server.Core.RageMP
|
||||
{
|
||||
public class RageTextLabel : RageEntity, ITextLabel
|
||||
{
|
||||
private TextLabel textLabel;
|
||||
|
||||
public string Text { get => textLabel.Text; set => textLabel.Text = value; }
|
||||
|
||||
public RageTextLabel(TextLabel textLabel) : base(textLabel)
|
||||
{
|
||||
this.textLabel = textLabel;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
ReallifeGamemode.Server.Core.RageMP/RageTextLabelAPI.cs
Normal file
19
ReallifeGamemode.Server.Core.RageMP/RageTextLabelAPI.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Server.Core.API;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
|
||||
namespace ReallifeGamemode.Server.Core.RageMP
|
||||
{
|
||||
public class RageTextLabelAPI : ITextLabelAPI
|
||||
{
|
||||
public ITextLabel CreateTextLabel(string text, Position position, float range, float size, Font font, API.Color color)
|
||||
{
|
||||
TextLabel textLabel = NAPI.TextLabel.CreateTextLabel(text, position.ToVector3(), range, size, (int)font, color.ToColor());
|
||||
|
||||
return new RageTextLabel(textLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user