protected Resource(MtaResource resource) { resources.Add(resource, this); MtaResource = resource; GameServer.OnStart += (Elements.ResourceRootElement source, Game.Events.OnStartEventArgs eventArgs) => { if (eventArgs.Resource.MtaResource != this.MtaResource) { return; } OnStart?.Invoke(); }; GameServer.OnPreStart += (Elements.ResourceRootElement source, Game.Events.OnPreStartEventArgs eventArgs) => { if (eventArgs.Resource.MtaResource != this.MtaResource) { return; } OnPreStart?.Invoke(); }; GameServer.OnStop += (Elements.ResourceRootElement source, Game.Events.OnStopEventArgs eventArgs) => { if (eventArgs.Resource.MtaResource != this.MtaResource) { return; } OnStop?.Invoke(); }; }
internal OnScreenShotEventArgs(MtaResource resource, dynamic status, dynamic imageData, dynamic timeStamp, dynamic tag) { Resource = Resource.Get(resource); Status = (StatusCode)status; ImageData = (string)imageData; TimeStamp = (int)timeStamp; Tag = (string)tag; }
internal static Resource Get(MtaResource resource) { if (resource == null) { return(null); } if (!resources.ContainsKey(resource)) { return(new Resource(resource)); } return(resources[resource]); }
internal OnStopEventArgs(MtaResource resource) { Resource = Resource.Get(resource); }
public static bool UpdateResourceACLRequest(MtaResource theResource, string rightName, bool access, string byWho) { throw new NotImplementedException(); }
public static MtaResource CopyResource(MtaResource theResource, string newResourceName, string organizationalDir) { throw new NotImplementedException(); }
public static bool StartResource(MtaResource resourceToStart, bool persistent, bool startIncludedResources, bool loadServerConfigs, bool loadMaps, bool loadServerScripts, bool loadHTML, bool loadClientConfigs, bool loadClientScripts, bool loadFiles) { throw new NotImplementedException(); }
public static bool StopResource(MtaResource theResource) { throw new NotImplementedException(); }
public static int GetResourceLastStartTime(MtaResource theResource) { throw new NotImplementedException(); }
public static bool SetResourceInfo(MtaResource theResource, string attribute, string value) { throw new NotImplementedException(); }
internal OnPreStartEventArgs(MtaResource resource) { Resource = Resource.Get(resource); }
public static bool RefreshResources(bool refreshAll, MtaResource targetResource) { throw new NotImplementedException(); }
public static string GetResourceOrganizationalPath(MtaResource theResource) { throw new NotImplementedException(); }
public static bool IsResourceArchived(MtaResource resourceElement) { throw new NotImplementedException(); }
public static int GetResourceLoadTime(MtaResource res) { throw new NotImplementedException(); }
public static MtaElement GetResourceMapRootElement(MtaResource theResource, string mapName) { throw new NotImplementedException(); }
public static string GetResourceLoadFailureReason(MtaResource theResource) { throw new NotImplementedException(); }
internal Resource(MtaResource resource) { resources.Add(resource, this); MtaResource = resource; }
public static bool RestartResource(MtaResource theResource, bool persistent, bool configs, bool maps, bool scripts, bool html, bool clientConfigs, bool clientScripts, bool clientFiles) { throw new NotImplementedException(); }
public static bool RemoveResourceFile(MtaResource theResource, string fileName) { throw new NotImplementedException(); }
public static dynamic GetResourceACLRequests(MtaResource theResource) { throw new NotImplementedException(); }