internal OnAcInfoEventArgs(dynamic detectedAcList, dynamic d3d9Size, dynamic d3d9Md5, dynamic d3d9Sha256) { DetectedAcList = MtaShared.GetArrayFromTable <string>(detectedAcList, "System.String"); D3d9Size = (int)d3d9Size; D3d9Md5 = (string)d3d9Md5; D3d9Sha256 = (string)d3d9Sha256; }
/// <summary> /// Get all compatible upgrades for this vehicle /// </summary> /// <returns></returns> public Upgrade[] GetCompatibleUpgrades() { int[] upInts = MtaShared.GetArrayFromTable(MtaShared.GetVehicleCompatibleUpgrades(element, -1), "System.Int32"); Upgrade[] upgrades = new Upgrade[upInts.Length]; for (int i = 0; i < upInts.Length; i++) { upgrades[i] = (Upgrade)upInts[i]; } return(upgrades); }
public LeaderboardRPC(dynamic data) { players = GetElementArray <Player>(data.players); //players = new List<Player>(); //foreach(dynamic player in MtaShared.GetArrayFromTable<Player>(data.players, "Slipe.Client.Peds.Player")) //{ // players.Add((Player)ElementManager.Instance.GetElement(player)); //} times = MtaShared.GetArrayFromTable <long>(data.times, "System.Int64"); }
protected void BuildFromTable(Dictionary <string, dynamic> t) { mass = (float)t["mass"]; turnMass = (float)t["turnMass"]; dragCoeff = (float)t["dragCoeff"]; float[] c = MtaShared.GetArrayFromTable(t["centerOfMass"], "System.Single"); centerOfMass = new Vector3(c[0], c[1], c[2]); percentSubmerged = (int)t["percentSubmerged"]; tractionMultiplier = (float)t["tractionMultiplier"]; tractionLoss = (float)t["tractionLoss"]; tractionBias = (float)t["tractionBias"]; numberOfGears = (int)t["numberOfGears"]; maxVelocity = (float)t["maxVelocity"]; engineAcceleration = (float)t["engineAcceleration"]; engineInertia = (float)t["engineInertia"]; driveType = (DriveType)Enum.Parse(typeof(DriveType), t["driveType"], true); engineType = (EngineType)Enum.Parse(typeof(EngineType), t["engineType"], true); brakeDeceleration = (float)t["brakeDeceleration"]; brakeBias = (float)t["brakeBias"]; steeringLock = (float)t["steeringLock"]; suspensionForceLevel = (float)t["suspensionForceLevel"]; suspensionDamping = (float)t["suspensionDamping"]; suspensionHighSpeedDamping = (float)t["suspensionHighSpeedDamping"]; suspensionUpperLimit = (float)t["suspensionUpperLimit"]; suspensionLowerLimit = (float)t["suspensionLowerLimit"]; suspensionFrontRearBias = (float)t["suspensionFrontRearBias"]; suspensionAntiDiveMultiplier = (float)t["suspensionAntiDiveMultiplier"]; seatOffsetDistance = (float)t["seatOffsetDistance"]; collisionDamageMultiplier = (float)t["collisionDamageMultiplier"]; monetary = (int)t["monetary"]; modelFlags = (uint)t["modelFlags"]; handlingFlags = (uint)t["handlingFlags"]; headLight = (VehicleLightType)Enum.Parse(typeof(VehicleLightType), t["headLight"], true); tailLight = (VehicleLightType)Enum.Parse(typeof(VehicleLightType), t["tailLight"], true); animGroup = (int)t["animGroup"]; }
public string[] GetVisibleTextureNames(string nameFilter = null, string modelId = null) { dynamic table = MtaClient.EngineGetVisibleTextureNames(nameFilter, modelId); return(MtaShared.GetArrayFromTable(table, "System.String")); }
public string[] GetModelTextureNames(string model) { dynamic table = MtaClient.EngineGetModelTextureNames(model); return(MtaShared.GetArrayFromTable(table, "System.String")); }
/// <summary> /// Gets an array of all elements of a specific type inside the collision shape /// </summary> public T[] GetElementsWithin <T>() where T : PhysicalElement { MtaElement[] array = MtaShared.GetArrayFromTable(MtaShared.GetElementsWithinColShape(element, ElementManager.Instance.GetTypeName(typeof(T))), "MTAElement"); return(ElementManager.Instance.CastArray <T>(array)); }
/// <summary> /// This function is used to retrieve a list of the child elements of a given parent element. Note that it will only return direct children and not elements that are further down the element tree. /// </summary> public Element[] GetChildren(string ofType = null) { MtaElement[] mtaElements = MtaShared.GetArrayFromTable(MtaShared.GetElementChildren(element, ofType), "MTAElement"); return(ElementManager.Instance.CastArray <Element>(mtaElements)); }
/// <summary> /// This function is used to retrieve an array of all elements of specified type within a range of 3D coordinates. /// </summary> public static PhysicalElement[] GetWithinRange(Vector3 position, float range, string type = "") { MtaElement[] mtaElements = MtaShared.GetArrayFromTable(MtaShared.GetElementsWithinRange(position.X, position.Y, position.Z, range, type), "MTAElement"); return(ElementManager.Instance.CastArray <PhysicalElement>(mtaElements)); }
/// <summary> /// Gets an array of all elements of a specific type inside the collision shape /// </summary> public PhysicalElement[] GetElementsWithinOfType(Type type) { MtaElement[] array = MtaShared.GetArrayFromTable(MtaShared.GetElementsWithinColShape(element, ElementManager.Instance.GetTypeName(type)), "MTAElement"); return(ElementManager.Instance.CastArray <PhysicalElement>(array)); }
public override void Parse(dynamic value) { players = GetElementArray <Element>(value.players); times = MtaShared.GetArrayFromTable <long>(value.times, "System.Int64"); }
/// <summary> /// Returns an array containing all accounts with specified dataName and value ( /// </summary> public static Account[] GetAccountsByData(string key, string value) { MtaAccount[] array = MtaShared.GetArrayFromTable(MtaServer.GetAccountsByData(key, value), "account"); return(CastMultiple(array)); }
/// <summary> /// Returns an array containing all accounts that were logged onto from specified IP-address. /// </summary> public static Account[] GetAccountsByIP(string ip) { MtaAccount[] array = MtaShared.GetArrayFromTable(MtaServer.GetAccountsByIP(ip), "account"); return(CastMultiple(array)); }
internal OnWhiteListChangeEventArgs(dynamic list) { ChangedDomains = MtaShared.GetArrayFromTable(list, "System.String"); }
/// <summary> /// Get an array of all rights on this ACL entry /// </summary> public string[] GetRights(AclRightEnum rightType) { return(MtaShared.GetArrayFromTable(MtaServer.AclListRights(entry, rightType.ToString().ToLower()), "System.String")); }