Hi,
i got a question for some python. how can i force resign a commander from his position?
Mats
[?] Resigning commander
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
[?] Resigning commander

Mineral: TIL that Wire-guided missiles actually use wire
-
CTRifle
- Retired PR Developer
- Posts: 1056
- Joined: 2011-01-03 14:57
Re: [?] Resigning commander
well we have a command for it for running servers, but im assuming you want the actual code?


-
piepieonline
- Retired PR Developer
- Posts: 433
- Joined: 2009-07-22 00:41
Re: [?] Resigning commander
Realityadmin does !resign it by switching the players team twice - I think that resigns the commander as well as anyone in a squad?
Code: Select all
AdminPM("?C1001" + foundPlayer.getName() + " has been resigned, " + reason, p)
host.rcon_invoke('game.sayall "?C1001RESIGNING PLAYER %s, %s"' % (foundPlayer.getName(), reason))
#bf2.gameLogic.sendGameEvent(foundPlayer, 13, 1) # Blurs the screen of the resigned player for a second
if foundPlayer.getTeam() == 1:
foundPlayer.setTeam(2)
foundPlayer.setTeam(1)
else:
foundPlayer.setTeam(1)
foundPlayer.setTeam(2)
Log(cmd, p.getName(), foundPlayer.getName(), reason)
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
Re: [?] Resigning commander
Thats it, thanks![R-DEV]piepieonline wrote:Realityadmin does !resign it by switching the players team twice - I think that resigns the commander as well as anyone in a squad?

Mineral: TIL that Wire-guided missiles actually use wire
