Begin script abstraction
This commit is contained in:
43
ReallifeGamemode.Server.Core.API/IPlayer.cs
Normal file
43
ReallifeGamemode.Server.Core.API/IPlayer.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using ReallifeGamemode.Server.Types;
|
||||
using ReallifeGamemode.Server.Common;
|
||||
using System.Net;
|
||||
|
||||
namespace ReallifeGamemode.Server.Core.API
|
||||
{
|
||||
public interface IPlayer : IEntity
|
||||
{
|
||||
string Name { get; set; }
|
||||
|
||||
string SocialClubName { get; }
|
||||
|
||||
int Health { get; set; }
|
||||
|
||||
int Armor { get; set; }
|
||||
|
||||
IPAddress RemoteAddress { get; }
|
||||
|
||||
IVehicle Vehicle { get; }
|
||||
|
||||
bool IsInVehicle { get; }
|
||||
|
||||
VehicleSeat VehicleSeat { get; }
|
||||
|
||||
void SendMessage(string message, ChatPrefix prefix = ChatPrefix.None) => SendRawMessage(prefix.GetValue() + message);
|
||||
|
||||
void SendRawMessage(string message);
|
||||
|
||||
void TriggerEvent(string eventName, params object[] args) => TriggerEventRaw("SERVER:" + eventName, args);
|
||||
void CancelAnimation();
|
||||
void TriggerEventRaw(string eventName, params object[] args);
|
||||
|
||||
void SetIntoVehicle(IVehicle vehicle, VehicleSeat seat);
|
||||
|
||||
void Kick();
|
||||
|
||||
void SendNotification(string message, bool flashing = true);
|
||||
|
||||
void Spawn(Position position, float heading = 0.0f);
|
||||
|
||||
void PlayAnimation(string dict, string name, AnimationFlags flags, float speed = 8.0f);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user