Jump to content

calling PlayerEnterColshape Event on Javascript Serverside doesn't work if c# is enabled


Recommended Posts

Two different js scripts, which work fine if C# is disabled, suddenly stopped working when I enabled c# to use salty-voice.
Error Message in Console: "Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.at void Bootstrapper.EventInternalClass.OnPlayerEnterColshape(ushort playerId, ushort colshapeId)"

the code in one of the js files:
mp.events.add("playerEnterColshape", (player, shape) => {
    if (shape.clothingShopType && typeof player.clothingShopType !== "string") player.clothingShopType = shape.clothingShopType;

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...