Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 33

Thread: Plugin API 2.0

  1. #21
    Administrator
    Join Date
    Mar 2010
    Location
    Tasmania, Australia
    Posts
    3,487
    Do you mean you want to use the procon http functions?

    if so, the port you need is set when you turn the http server on..

    the other port is the same one you use to connect with procon

    http://[your computers ip as seen from the outside]:[http port you define in procon]/[server ip. same as you put into procon]:[same port you put into procon]/players

  2. #22
    We have a Webpage to manage bans for BF3 Ban Manager. Now we want to add a livescoreboard to this webpage. Therefore the wepage is running a script getting playerdata from the gameserver but we need the queryport of the gameserver for this.

  3. #23
    Developer
    Join Date
    Apr 2010
    Location
    Münster(Westf.), Germany
    Posts
    3,134
    Quote Originally Posted by DaMagicWoBBeR View Post
    Getting live scoreboard from the server via a webpage . Therefore you need the query port from the server. I know there is a plugin also writing the scoreboard into a database, but if someone not using the plugin our webpage would also not work.
    Than using a plugin to query the "query port" is the wrong approach
    even Procon does provide the servers IP and port it is connected to through
    Code:
    public void OnPluginLoaded(string strHostName, string strPort, string strPRoConVersion) { }
    You already know the query port because you set up Procon to use it.
    If you want a live scoreboard on your webseite use the existing php frameworks/modules like


    But you won't get the game port players have to connect with their clients to
    because the only game including that in the serverInfo response is BFBC2.

    Take a look at the php frontend for use with the stats plugin(s) it also includes
    a library / module / script to show a live scoreboard.

    Remember admin.listPlayers all is one of the few commands which can be send
    over rcon with out the need to authenticate. You could also do it via Python.
    But that command is the only source to get your scoreboard data together
    with serverInfo.

    Greets
    Phil.
    Last edited by Phil_K; 28-03-2013 at 10:53. Reason: geting old.. update information, order of infos

  4. #24
    Ok so queryport has to entered manuell.

    You also won't get the game port players have to connect with their clients to
    because the only game including that in the serverInfo response is BFBC2.
    serverInfo gives me the ip and gameport 25200 as respones for the gameserver player can connect to. Is it always 25200, also the port player connect to is no 25200?

  5. #25
    Developer
    Join Date
    Apr 2010
    Location
    Münster(Westf.), Germany
    Posts
    3,134
    So we talk about a BFBC2 server?

    Quote Originally Posted by DaMagicWoBBeR View Post
    Ok so queryport has to entered manuell.
    Depending where you want it to use yes and no.
    See my updated post.

    serverInfo gives me the ip and gameport 25200 as respones for the gameserver player can connect to. Is it always 25200, also the port player connect to is no 25200?
    Pardon?
    If the server sends in its response to serverInfo for "<externalGameIpAndPort: IpPortPair>" the value pair "<ip>:<port>" and the port is 25200 that is the port for your server all players connect to. Regarding the docs that port might be changeable because that pair is exchanged by the server browser.

    Again, if you want to set up a website showing a live scoreboard why are you fiddling with a plugin?
    I can see no advantage in it except directly using a stats2db plugin combined with its php frontend.

  6. #26
    The plugin only writes the query port into the database for the server with other serverinformation like name ip/gameport. The Webpage will read the query port from the database and try to get the livescoreboard.

    If the server sends in its response to serverInfo for "<externalGameIpAndPort: IpPortPair>" the value pair "<ip>:<port>" and the port is 25200 that is the port for your server all players connect to. Regarding the docs that port might be changeable because that pair is exchanged by the server browser.
    the question is if the gameport is changed what will i get from the plugin api the correct port or only everytime 25200 cause ip:gameport is primary key in the database. I cant test this cause i cant change the gameport for our servers

  7. #27
    Developer
    Join Date
    Apr 2010
    Location
    Münster(Westf.), Germany
    Posts
    3,134
    Quote Originally Posted by DaMagicWoBBeR View Post
    The plugin only writes the query port into the database for the server with other serverinformation like name ip/gameport. The Webpage will read the query port from the database and try to get the livescoreboard.
    Ah, that kind of use makes sense.

    the question is if the gameport is changed what will i get from the plugin api the correct port or only everytime 25200 cause ip:gameport is primary key in the database. I cant test this cause i cant change the gameport for our servers
    Well, the plugin API will not provide you the gameport directly you have to get "ExternalGameIpandPort" out of a serverInfo response.
    So you need to hook up with
    Code:
    OnServerInfo(CServerInfo serverInfo) { }
    If the gameport changes the server will send what it uses.
    But the gameport is only changeable by commandline parameters and it needs a server restart.
    There only a very few reasons one would change the gameport and I can't think of one a GSP
    will do it on its own without giving you a note.

  8. #28
    Ok thank you so i think it should work the way we do it

  9. #29
    This thread has API info for the virtual function callbacks only. Is there documentation for the rest of the API? Other callable functions for PRoConPluginAPI, and all the related classes like Ping, timers etc?

    Sorry if this is listed somewhere already but I can't find it.

  10. #30
    "I was a genuinely nice person before I joined this community"
    Join Date
    May 2010
    Location
    Austria
    Posts
    3,273
    Unfortunately, there's no real documentation for plugin development.

    It's probably best to take a look at the given doc and a few larger plugins to get a better grip at the plugin API.


    Before posting: Have you read the MANUAL?
    Before posting: Have you used the SEARCH?

    I will not provide support through PMs or TeamSpeak. Please post your questions in our forums.


 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •