战地2隐藏武器解锁方法
(2008-11-14 00:12:54)
标签:
战地解锁武器游戏 |
分类: 杂七杂八 |
战地2 隐藏武器解锁方法
打开路径:Battlefield 2\python\bf2\stats的unlocks文件复制以下文字便可
import host
import bf2.PlayerManager
from bf2.stats.constants import *
from bf2 import g_debug
# map gamespy item ids to kits
unlockItemMap = {
11 : 0,
22 : 1,
33 : 2,
44 : 3,
55 : 4,
66 : 5,
77 : 6,
}
sessionPlayerUnlockMap = {}
def init():
# Events
host.registerHandler('PlayerConnect', onPlayerConnect, 1)
if bf2.serverSettings.getUseGlobalUnlocks():
host.registerHandler('PlayerUnlocksResponse', onUnlocksResponse,
1)
# Connect already connected players if reinitializing
for p in bf2.playerManager.getPlayers():
onPlayerConnect(p)
if g_debug: print "Unlock module initialized"
class UnlockSet: pass
def onPlayerConnect(player):
defaultUnlocks = [1, 1, 1, 1, 1, 1, 1]
host.pers_plrSetUnlocks(player.index, defaultUnlocks,
defaultUnlocks)
if not player.isAIPlayer():
id = player.index
reconnect = id in sessionPlayerUnlockMap