Begin script abstraction

This commit is contained in:
hydrant
2020-02-29 14:50:10 +01:00
parent 447dd2eabc
commit 37f499a446
48 changed files with 2201 additions and 49 deletions

View 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);
}
}