Jump to content

Server side c# events not getting called


Recommended Posts

Posted (edited)

Hello,

I have a simple function linked to the PlayerConnected event which is never getting called. I also have a PlayerDisconnected event however that gets called when player connects.

Code below:

 

[ServerEvent(Event.PlayerConnected)]
public void PlayerConnect(Client player)
{
    NAPI.Util.ConsoleOutput("Player connect");
}

[ServerEvent(Event.PlayerDisconnected)]
public void PlayerDisconnect(Client player)
{
    NAPI.Util.ConsoleOutput("Player disconnect");
}

 

EDIT:

Found the issue, had to copy bootstrapper from the bridge runtime folder to my nuget package location.

Also needed to set my compilation target arch to x64.

Ref.:

Mods feel free to lock or delete the thread.

Edited by don

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...