-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CName returns random gibberish for modded vehicles #31
Comments
You can't use the CName value directly from the packet if it's a mod, it will need converting to hex. If all three characters in CName are alphanumeric (0-9,A-Z,a-z), then it is compatible with stock LFS cars and you can use it as is. Otherwise, you need to use the hex representation of the binary value of CName to get the mod Skin ID I don't know if there's a helper already in Node InSim to do this for you, but I couldn't find one at first glance. |
For ref - https://www.lfs.net/forum/thread/95662-New-InSim-packet-size-byte-and-mod-info explains, from the dev team. |
…s correctly Changed the decorator of `CName` property to `@carName()` which converts the Skin ID binary representation to a HEX string internally. fix #31
Thanks for the report, it is a bug. The |
🎉 This issue has been resolved in version 4.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi,
I'm using useOnPacket which is a react-node-insim hook, the issue is CName returns random gibberish for modded vehicles only and this does not happen with default LFS vehicles. The same behavior occurs when using inSim.on() method and capturing ISP_NPL packets as well.
I'm capturing ISP_NPL packet to make an API call to retrieve the modded vehicle name in order to save it.
Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered: