[bf1942] Python Question
Brigham Stevens
brs at vikingmind.com
Fri Jun 17 16:44:46 EDT 2005
Anyone know.....
what does Player.getSquadId() return if the player is not in a squad?
If I use the print sattements will that appear in the console?
here is the top of the autobalance script.... I'm trying to print out
the value of the squad - I don't see it in the console? Ideally what I
would like to do is see if there are players in game that are not ina
squad. If there are players not in a squad, then don't autobalance
someone in a squad, otherwise, balance the player in the squad!
def onPlayerDeath(p, vehicle):
if not bf2.serverSettings.getAutoBalanceTeam(): return None
if p.isCommander(): return None
if p.isSquadLeader(): return None
print "name: %s squadID: %d" % p.getName() % p.getSquadId()
# dont use autobalance when its suicide/changes team
More information about the Bf1942
mailing list