Need help using your dll

Topics: Admin Tool
Nov 28, 2011 at 8:22 PM
Edited Nov 28, 2011 at 10:28 PM


I want to write my own application to access and control my BF3 server and I have start to use your DLL to do so, I have manage to establish the connection to the server and do some basic stuff, I'm coding in 2010, here is a sample of my chat msgbox code:



Private Sub pchat(ByVal sender As Object, ByVal e As System.Net.Battlefield3.PlayerChatEventArgs)

         MSGBox.Text += "Chat From " + e.Source + ": " + e.Message

End Sub


I want to add to this line, to who the chat was sent (all player, to team, or to squad) but cant find where to get this info from...

Can you help?

And thank you for the DLL!!!

Nov 28, 2011 at 11:46 PM

During the BF3 beta, the destination of messages was given, but this was taken out. At the moment, there's no way to determine where a message comes from.

Dec 1, 2011 at 4:26 PM
Edited Dec 2, 2011 at 2:40 PM

Hi again, I still need some help, but this time with the client.sendrequest() command, I'm able to use it to change variables like server name this way:

client.SendRequest("vars.servername", "[NOS] Name Of Server")

and it does the job, but when I try to use it to send admin chat it failed, here is what I have tried:

client.SendRequest("admin.say", "test123 All") : Failed

client.SendRequest("admin.say", "test123", "All") : Failed

client.SendRequest("admin.say", "test123") : Failed


What would be the correct syntax to send chat to all or to team 1 or 2?


Thank you


Edit: I've found it : client.SendRequest("admin.say", "test123", "all") to chat to all and client.SendRequest("admin.say", "test123", "team", "2") to chat to team 2, my mistake was that the all command need to be lowercase


EDIT: NEW Question:

Ok, again need some help, since the R9 patch, when people join the server, they are not automatically put in squad, so I'm trying to make a "Squad Up" script that will take players that aren't in squad and make them join a squad in  their team, filling in the most full squad first and then creating new squad as needed, I got most of the code done but have some difficulties...

1- When a squad is private, even if there is room, it appear that I cant force a player to move to that squad, is there a method to check if the squad is private or public? Until I found a method to see if squad is private or not, what I do is I try 4 time to move the player to squad x, and then it will try to move him to next squad.


2- I don't know why, but when I pass the command with variable like this it doesn't work: 

client.SendRequest("admin.movePlayer", client.Players(y).Name.ToString, client.Players(y).TeamId.ToString, tagArrSqt1(x).ToString, "0")

In debugging attempt, I had displayed the variable use in that sentence to a msgbox to make sure that they were correctly set, and they where, but if I send the command with no variables but hardcode the same values like this it does work:

client.SendRequest("admin.movePlayer", "Nameofplayer", "1","1", "0") 

Do you have any idea why when I use variables it doesnt work?