// Get Script Config Data private void GetInitializedData([FromSource] Player player) { string VehiclesConfig = API.LoadResourceFile(API.GetCurrentResourceName(), "/configs/vehicles.json"); player.TriggerEvent("ExtractionSaw:InitializePlayer", VehiclesConfig); }
//Append a new "InGameText" object to the list of text and return it's ID public static void CreateText([FromSource] Player PlayerExecutingCommand, string Text, Vector3 Position, int Size, int Font, int Range) { ActiveText.Add(new Utils.InGameText(Position, Text, Size, Font, Range, NextID)); PlayerExecutingCommand.TriggerEvent("SimpleText:Client:ShowNotification", $"~g~The text has been spawned!"); UpdateAllTextLists(); }
public static void UpdateAllData(Player player) { player.TriggerEvent("TTT:GetPlayerAllData"); }
//Send the new list of active texts to the player for them to store locally public static void UpdateTextList([FromSource] Player PlayerToUpdate) { PlayerToUpdate.TriggerEvent("SimpleText:Client:Update", ActiveText.Select(text => text.ToExpandoObject())); }