Search the Community

Showing results for tags 'AttachEntityToEntity'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RAGE Multiplayer
    • Announcements
    • Discussion
    • Suggestions
    • RDR2 Multiplayer
  • Scripting
    • Scripting
    • Resources
  • Community
    • Support
    • Servers
    • Media Gallery
  • Non-English
    • Русский - Russian
    • Français - French
    • Deutsch - German
    • Espanol - Spanish
    • Română - Romanian
    • Portuguesa - Portuguese
    • Polski - Polish

Categories

  • Scripts
  • Gamemodes
  • Libraries
  • Plugins
  • Maps
  • Tools

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Facebook


Youtube


Skype


Web


VK

Found 1 result

  1. Okay. So since there is no server - side implementation for C# AttachEntityToEntity() I'm told to do it in the client-side. However when I pass the arguments to my client-side with the TextLabel and Vehicle objects. I'm not sure how to attach them. TextLabel being attached to the Vehicle. I've used the class's .handle attribute the .Id attribute. But nothing seems to work. I'll provide the code for the respective sides. Server - side // Server Side // private static string VehTxtLblKey = "VehicleTextLabel"; [RemoteEvent("VehicleSpawnFromClient")] public void NativeVehSpawn(Client player, bool locked, bool engine, string vName) { uint vHash = NAPI.Util.GetHashKey(vName); Vehicle veh; veh = NAPI.Vehicle.CreateVehicle(vHash, player.Position.Around(5), 0.0f, 0, 0, locked: locked, engine: engine); TextLabel tLabel; tLabel = NAPI.TextLabel.CreateTextLabel($"[{vName}]", veh.Position, 15.0f, 1.5f, 1, new Color(0, 0, 255, 255), true); veh.SetSharedData(VehTxtLblKey, tLabel); NAPI.ClientEvent.TriggerClientEventForAll("AttachVehTxtLblForAll", VehTxtLblKey, veh); player.SendNotification($"You have created {vName}"); } // End of Server Side // Client - side public VehicleTextdraw() { Events.Add("AttachVehTxtLblForAll", VehTxtLblAll); } public void VehTxtLblAll(object [] args) { string tlKey = (string)args[0]; Vehicle veh = (Vehicle)args[1]; TextLabel tlLabel = (TextLabel)veh.GetSharedData(tlKey); if (!RAGE.Game.Entity.IsEntityAttachedToEntity(tlLabel.Id, veh.Id)) { Chat.Output($"Entity is being attached!"); RAGE.Game.Entity.AttachEntityToEntity(tlLabel.Id, veh.Id, 0, 0, 0, 0, 0, 0, 0, true, false, false, false, 0, false); } } If anyone could help me out here, then that'll be a huge help.