using RageCoop.Core.Scripting; namespace RageCoop.Client.Scripting { /// /// Inherit from this class, constructor will be called automatically, but other scripts might have yet been loaded, you should use . to initiate your script. /// [GTA.ScriptAttributes(Author = "RageCoop", NoDefaultInstance = true, SupportURL = "https://github.com/RAGECOOP/RAGECOOP-V")] public abstract class ClientScript : GTA.Script { /// /// An instance to communicate with RageCoop /// protected static API API => Main.API; /// /// This method would be called from background thread, call to dispatch it to main thread. /// public abstract void OnStart(); /// /// This method would be called from background thread when the client disconnected from the server, you MUST terminate all background jobs/threads in this method. /// public abstract void OnStop(); /// /// Get the instance where this script is loaded from. /// public ResourceFile CurrentFile { get; internal set; } /// /// Get the that this script belongs to. /// public ClientResource CurrentResource { get; internal set; } /// /// Eqivalent of in /// public Core.Logger Logger => CurrentResource.Logger; } }