thankyou
Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here

NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

Author Topic: Poweradmin BF3  (Read 34196 times)

Offline Wright

  • Full Member
  • ***
  • Posts: 133
  • eliteclangaming.com
    • Elite Gaming
Re: Poweradmin BF3
« Reply #30 on: November 14, 2011, 07:09:29 AM »
I was hoping you could provide me with some advice. I was just playing around with the code in this plugin to see what I could do with it. I though it would be kind of cool to add the ability to toggle a server infantry only through B3. I have been unable to get this to work however regardless of what I try. I can't seem to find any errors. It simply doesn't seem to do anything when I use the command.

Here is the class I added to poweradmin in my experimentation:

Code: python [Select]
    def cmd_vehicles(self, data, client=None, cmd=None):
        """\
        <vehicles> - Toggles vehicles on or off.
        """

        m = self._adminPlugin.parseUserCmd(data)
        if not m:
            client.message('^7Invalid parameters, you must supply a the number of slots to make the server.')
            return False

            if m[0] != '0' or '1':
                self._adminPlugin.warnClient(client, 'Invalid input. You may only use 1 for yes or 0 for no.', None, False, '', 1)
            else:
                self.console.write(('vars.vehicleSpawnAllowed', m))
                self.debug('The vars.vehicleSpawnAllowed has been altered using !vehicles.')


Here is the resulting log entry when the command is used:
Code: log [Select]

110909 22:07:44 VERBOSE 'XlrstatsPlugin: ----> XLRstats: Victim: oldsk: 977.358 - newsk: 970.779'
110909 22:07:46 CONSOLE "['player.onChat', 'Elite-Wright', [email protected] 1']"
110909 22:07:46 DEBUG 'looking for event handling method called : OnPlayerChat'
110909 22:07:46 DEBUG "routing ----> OnPlayerChat(['Elite-Wright', [email protected] 1'])"
110909 22:07:46 VERBOSE 'Queueing event Say @vehicles 1'
110909 22:07:46 VERBOSE 'Parsing Event: Say: AdminPlugin'
110909 22:07:46 DEBUG 'AdminPlugin: OnSay handle 5:"@vehicles 1"'
110909 22:07:46 DEBUG 'AdminPlugin: Handle command @vehicles 1'
110909 22:07:49 CONSOLE "['player.onKill', 'Delrok', 'CallDaAmberlamps', 'M27IAR', 'false']"
110909 22:07:49 DEBUG 'looking for event handling method called : OnPlayerKill'


Nothing changes, not after the next map even. Am I missing something really simple here?
xfire: blitzwright

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: Poweradmin BF3
« Reply #31 on: November 14, 2011, 08:03:53 AM »
Code: python [Select]
if m[0] != '0' or '1':  
is not interpreted as you think. It is equivalent to
Code: python [Select]
if (m[0] != '0') or ('1' != '' and '1' is not None):  
as is always True.
Try instead :
Code: python [Select]
if m[0] not in ('0', '1'):  


But for switching to infantry mode, just type !loadconfig infrantry and it should be fine.

Offline Wright

  • Full Member
  • ***
  • Posts: 133
  • eliteclangaming.com
    • Elite Gaming
Re: Poweradmin BF3
« Reply #32 on: November 15, 2011, 01:28:34 AM »
Thanks for the clarifications.
xfire: blitzwright

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: Poweradmin BF3
« Reply #33 on: November 25, 2011, 01:32:12 AM »
v0.10 released

adds a config manager which can load a server config given the current gamemode and/or map name (thanks to Freelander)

Offline Mariodu62

  • Sr. Member
  • ****
  • Posts: 466
Re: Poweradmin BF3
« Reply #34 on: November 25, 2011, 11:24:02 AM »
thx...

Any example for config manager ???

Offline Freelander

  • XLRstats dev.
  • Dev. Team
  • Hero Member
  • *
  • Posts: 1000
Re: Poweradmin BF3
« Reply #35 on: November 25, 2011, 11:47:32 AM »
This feature is ported from xlr8or's config manager plugin for CoD. Unfortunately some settings take affect after a map/round change in BF3 so note that those will not change anything with this feature.

According to server admin documentation only these settings take affect instantenously. Also note that some of these settings are read only on ranked servers.

Code: [Select]
vars.regenerateHealth
vars.teamKillCountForKick
vars.teamKillValueForKick
vars.teamKillValueIncrease
vars.teamKillValueDecreasePerSecond
vars.teamKillKickForBan
vars.idleTimeout
vars.idleBanRounds
vars.vehicleSpawnAllowed
vars.vehicleSpawnDelay
vars.soldierHealth
vars.playerRespawnTime
vars.playerManDownTime
vars.bulletDamage
vars.gameModeCounter
vars.onlySquadLeaderSpawn
vars.allUnlocksUnlocked

As explained in the plugin config file:

It will first look if a b3_<gametype>_<mapname>.cfg exists (example: b3_teamdeathmatch0_mp001.cfg) and execute it. If it doesn't exist, it checks for b3_<gametype>.cfg (example: b3_rushlarge0.cfg).

If none of them exist, it will look for b3_main.cfg. This file makes it possible to reset certain vars, so always create a b3_main.cfg if you want to enable and use this feature.

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: Poweradmin BF3
« Reply #36 on: November 26, 2011, 07:39:36 PM »
0.11 released

This release is just a fix to correct the names of the example config files provided in the 'configmanager' folder. To work properly, those files must be named with lowercase characters only.

Windows users : you might find it difficult to rename a file by just changing the case of letters. The trick is to rename the file in two steps as in the example below :

Let say I want to rename "b3_ConquestSmall0.cfg" to "b3_conquestsmall0.cfg"
  • step 1 : rename "b3_ConquestSmall0.cfg" to "b3_conquestsmall0_foo.cfg"
  • step 2 : rename "b3_conquestsmall0_foo.cfg" to ""b3_conquestsmall0.cfg"

Offline SanKen

  • Sr. Member
  • ****
  • Posts: 212
    • ProGaming - Only Multigaming is the most important
Re: Poweradmin BF3
« Reply #37 on: November 26, 2011, 10:32:18 PM »
plz change this line 240

Code: python [Select]
def cmd_kill(self, data, client, cmd=None):
        """\
        <player> [reason] - Kill a player without scoring effects
        """
        # this will split the player name and the message
        name, reason = self._adminPlugin.parseUserCmd(data)
        if name:
            sclient = self._adminPlugin.findClientPrompt(name, client)
            if not sclient:
                # a player matching the name was not found, a list of closest matches will be displayed
                # we can exit here and the user will retry with a more specific player
                return
            elif sclient.maxLevel >= client.maxLevel:
                if sclient.maxGroup:
                    client.message(self.getMessage('operation_denied_level', {'name': sclient.name, 'group': sclient.maxGroup.name}))
                else:
                    client.message(self.getMessage('operation_denied'))
            else:
                try:
                    self.console.write(('admin.killPlayer', sclient.cid))
                    if reason:
[b]                        client.message("%s was killed by %s reason: %s" % (sclient.name, client.name, reason))[/b]
                    else:
[b]                        client.message("%s was killed by %s noreason" % (sclient.name, client.name))[/b]
                except CommandFailedError, err:
                    if err.message[0] == "SoldierNotAlive":
                        client.message("%s is already dead" % sclient.name)
                    else:
                        client.message('Error: %s' % err.message)

This edition shows the admin who killed. And not "killed by admin"
« Last Edit: November 26, 2011, 10:34:12 PM by SanKen »
Very sorry for my English I do not know him enough to be understood.
That is why I use the google translator.

Offline Mariodu62

  • Sr. Member
  • ****
  • Posts: 466
Re: Poweradmin BF3
« Reply #38 on: November 27, 2011, 08:27:09 AM »
0.11 released

This release is just a fix to correct the names of the example config files provided in the 'configmanager' folder. To work properly, those files must be named with lowercase characters only.

Windows users : you might find it difficult to rename a file by just changing the case of letters. The trick is to rename the file in two steps as in the example below :

Let say I want to rename "b3_ConquestSmall0.cfg" to "b3_conquestsmall0.cfg"
  • step 1 : rename "b3_ConquestSmall0.cfg" to "b3_conquestsmall0_foo.cfg"
  • step 2 : rename "b3_conquestsmall0_foo.cfg" to ""b3_conquestsmall0.cfg"


I ilke your humor, courgette

Maybe too many years with Linux...  ;D

Offline Mariodu62

  • Sr. Member
  • ****
  • Posts: 466
Re: Poweradmin BF3
« Reply #39 on: November 27, 2011, 08:33:38 AM »
@sanken:

Why do they need to know who killed them ???

an admin killed them and that's all... usually an admin don't kill because he likes that

He lost time and he is usually killed when he do the job...

Offline Hodgy

  • Newbie
  • *
  • Posts: 4
Re: Poweradmin BF3
« Reply #40 on: November 30, 2011, 05:23:19 AM »
Hi guys is there any way to scramble but not the admins? say level 60 and above?
« Last Edit: December 01, 2011, 04:59:45 AM by Hodgy »

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: Poweradmin BF3
« Reply #41 on: November 30, 2011, 11:13:47 AM »
not without changing the code

Offline Hodgy

  • Newbie
  • *
  • Posts: 4
Re: Poweradmin BF3
« Reply #42 on: December 01, 2011, 05:02:09 AM »
not without changing the code

Thanks for the reply!

Any chance somebody could look into this?

Offline Spyderspartan

  • Jr. Member
  • **
  • Posts: 10
Re: Poweradmin BF3
« Reply #43 on: December 06, 2011, 04:31:54 AM »
Any way we could get a manual auto balance added to this?

Offline Hodgy

  • Newbie
  • *
  • Posts: 4
Re: Poweradmin BF3
« Reply #44 on: December 06, 2011, 05:10:10 AM »
Noob here!


How do I setup the config manager?

 


Rate this page +1 at Google Search