Page 1 of 1

[?] Resigning commander

Posted: 2013-12-11 21:01
by Mats391
Hi,
i got a question for some python. how can i force resign a commander from his position?

Mats

Re: [?] Resigning commander

Posted: 2013-12-12 04:35
by CTRifle
well we have a command for it for running servers, but im assuming you want the actual code?

Re: [?] Resigning commander

Posted: 2013-12-12 09:50
by piepieonline
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)

Re: [?] Resigning commander

Posted: 2013-12-12 11:36
by Mats391
[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?
Thats it, thanks!