Results 1 to 3 of 3
  1. #1
    Spamming the boards! NHLfan's Avatar
    Join Date
    Sep 2010
    Replies
    20
    Country
    Austria
    Steam
    Dudler3000

    Question autojoin fireteams via lua script?

    Hi,
    Is there a way to make players autojoin public fireteams?

    a player connects to a server and the script searches for public fireteams which are not full (yet) and puts the player into the fireteam.
    If there is no public fireteam, or the existing ones are already full -> create a new public fireteam and make the player join this one instread.

    Is this possible via lua_script?
    Is there already such a script, or a similar way to make players autojoin fireteams?

    thanks in advance!

  2. #2
    Here I am! Timothy's Avatar
    Join Date
    Jun 2011
    Replies
    10
    This may be possible by checking and adjusting the configstrings. The fireteam configstrings (CS_FIRETEAMS) are typically at the end and contain the fireteam members formatted in a bitwise pattern. You can view configstring information on your server with the commands csinfo <id> (id is optional, it lists all strings). One such configstring may look like:

    Code:
    \id\0\l\0\p\0\c\0000000000000005
    in which player slot 0 and slot 2 have occupied a place in the fireteam. Note that the id equals 0, which means that this is fireteam alpha and the leader is set to player slot 0. Check the leader's team by using entity information: sess.sessionTeam is your friend in this case. By checking his team you automatically know the fireteam's team as well.

    You may also check my implementation for WolfAdmin for reference: click here. It contains some functions to parse the configstring, but it doesn't allow editing. Lastly, I have not experienced with editing these configstrings so I do not know the effect of doing so; it might not work at all or have strange effects.
    Last edited by Timothy; 13-01-2017 at 10:04.

  3. #3
    Spamming the boards! NHLfan's Avatar
    Join Date
    Sep 2010
    Replies
    20
    Country
    Austria
    Steam
    Dudler3000
    Hey there!
    thanks for your reply.

    I never did something in lua before and I tried to understand the documentaries, but unfortunately it's too much for me.

Posting Permissions