Log in to reply

[C#, SHV.NET] Deleting a Bone from an Entity, possible?

  • Hello! Is it possible to delete a bone from an Entity? Like, deleting a hand from a ped, or the engine from a car?
    I've tried looking for something similar to WEAPON::GET_CURRENT_PED_WEAPON_ENTITY_INDEX but for bones, but I'm at a loss.
    Is there any way at all to get the Entity handle of a bone, if it even exists?

    Any help would be appreciated, thanks!

  • @stillhere Do you mean just the bone or the full model of it?

  • @GTATerminal I guess just the bone is enough? I want to remove the "interior light" vehicle bone, which I hope will stop the interior light from turning on when a door is open. I've already tried the native function for the interior light and it only works setting InteriorLightOn = true, but not vice versa. Thanks for the reply btw!

  • @stillhere Are you calling it just once? Because if you toggle it to a keybind, press the key once, then it won't stay disabled.

    If that's what you're doing then just add the native function for disabling the Interior Light in a method that gets constantly updated.

    Something like this

    public Main()
        Tick += new EventHandler(Update);
        this.Interval = 1;
    private void Update(object sender, EventArgs e)
        GTA.Native.Function.Call(0xBC2042F090AF6AD3, new InputArgument[]{ vehicle, false});

  • @GTATerminal Thanks for the help, I've already tried calling it OnTick, with and without an Interval, and it doesn't seem to work.
    I'm not exactly sure how to use your method though, so I couldn't test it. When I change "vehicle" to Game.Player.Character.CurrentVehicle, I get "Cannot convert from 'ulong' to GTA.Native.Hash'".

    Here is the source code I am working with, for reference.

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.