Jump to content
5rock4

Plugin API Documentation?

Recommended Posts

Posted (edited)

I'm trying to develop a plugin, but I can't seem to find documentation on many data types, specifically: 

public virtual void OnPlayerKilled(Kill kKillerVictimDetails) { }

What does a Kill consist of? What kind of things are stored in a Kill object? Where can I find documentation on the events like OnPlayerKilled?

I can read the code for the C# in the PRoCon github, but is there documentation anywhere? 

Sorry if this is answered other places, I can't seem to find them.

Edited by 5rock4

Share this post


Link to post
Just now, Flash_Hit said:

Thanks for the point in the right direction, but many API's have documentation regarding how some datatypes are/should be used: https://discord.com/developers/docs/resources/user#user-object

 

Is there anything like this for plugin development?

Share this post


Link to post

Most events just deliver strings and classes but there are some that deliver things like Kill or CPlayerInfo. You have to look up the files then. Tbh with these 2 files you have already almost everything. The most things are only working on BFBC2. Some of them will work in Venice Unleashed with an extra mod. I.e. textchatmoderation and unlocklists

 

also you should write what Plugin I r going to develop, maybe someone already done it

Share this post


Link to post

Battlefield 4. 

It's a plugin for a server I'm helping develop to do custom things based on kills. I want to be able to set custom melee kill messages, with a future feature being players can set their own custom knife messages. Like a battlecry when people join the server.

Share this post


Link to post

Okay that shouldn’t be to hard

you just need to find out if the damagetype is a knife/melee and then if the player has set up a custom message, if not you can just send some default presets to the chat.

then you need to add a command like !mykillmessage where the player can write his knife kill message which gets saved in a dict with his soldierName 
then send a response if it was successful to the player.

i think that’s all. Probably you would have to set up some conditions for the message. Like no bad language. Or split the message in parts and check replace ‚player‘ with Victim.SoldierName and ‚knife‘ with damageType.

whatever good luck with it

Share this post


Link to post

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


  • Our picks

    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 4 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.