加载中…
个人资料
噢叶
噢叶
  • 博客等级:
  • 博客积分:0
  • 博客访问:8,469
  • 关注人气:150
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

战地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

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有