[?] Resigning commander

Making or wanting help making your own asset? Check in here
Post Reply
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

[?] Resigning commander

Post by Mats391 »

Hi,
i got a question for some python. how can i force resign a commander from his position?

Mats
Image

Mineral: TIL that Wire-guided missiles actually use wire
CTRifle
Retired PR Developer
Posts: 1056
Joined: 2011-01-03 14:57

Re: [?] Resigning commander

Post by CTRifle »

well we have a command for it for running servers, but im assuming you want the actual code?
Image
Image
piepieonline
Retired PR Developer
Posts: 433
Joined: 2009-07-22 00:41

Re: [?] Resigning commander

Post 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)
Image
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [?] Resigning commander

Post 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!
Image

Mineral: TIL that Wire-guided missiles actually use wire
Post Reply

Return to “PR:BF2 Community Modding”