Jump to content
Aussie Cleetus

BEC Plugins

Recommended Posts

Are there many people on this forum who are familiar with BEC Plugin coding?

I'm trying to do a Player login/logout announcer Plugin. I've used the extend examples for player connect and disconnect. I get no errors at all, but at the same time, I also get no results happening either.

PlayerAnnounce BEC Plugin - GitHub

Any help would be greatly appreciated.

I understand I could do this in the pbo's, but I'm trying to do it this way, because I want to limit the amount of edits I do in pbo files (to reduce the amount of work required restoring work done when updates happen to the Server code).

Share this post


Link to post
Share on other sites

Have you any experience with Python?

You just created some decorators without using them and additionally your naming conventions are fucked.

Put this in your class (&fix the indention). Afterwards you get at least something :)


@Be_PlayerConnected
def connected(self, data):
	self.org_func_connected(data)

@Be_PlayerDisconnected
def disconnected(self, data):
	self.org_func_disconnected(data)

 

  • Like 1

Share this post


Link to post
Share on other sites
34 minutes ago, philippj said:

Have you any experience with Python?

You just created some decorators without using them and additionally your naming conventions are fucked.

Put this in your class (&fix the indention). Afterwards you get at least something :)



@Be_PlayerConnected
def connected(self, data):
	self.org_func_connected(data)

@Be_PlayerDisconnected
def disconnected(self, data):
	self.org_func_disconnected(data)

 

Thank you for the help. It's mostly the code from the example plugin, I only changed 4 lines. The code examples are poorly commented.

 

I have no python experience myself, there are very limited real-world applications for it in my life, so I never bothered to learn it.

Share this post


Link to post
Share on other sites
17 minutes ago, Aussie Cleetus said:

Thank you for the help. It's mostly the code from the example plugin, I only changed 4 lines. The code examples are poorly commented.

 

I have no python experience myself, there are very limited real-world applications for it in my life, so I never bothered to learn it.

 

There is ton of real-world applications using Python. It just isnt used for the typical end-user applications

Share this post


Link to post
Share on other sites

I agree that it has it's uses, just not often enough in my line of work (music teacher - lol).

 

Though the plugin still reports no errors, user logins and logouts are not being caught.

I added print() lines to debug, and it seems as if it's loading, but nothing is triggering. Nothing prints after "Self Instance Setup" is sent out to the console.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×