比如加一个名为haha的女警
第一步
首先修改cstrike\addons\amxmodx\configs\nst_player.ini 人物配置文件
添加
[name]haha[model]haha[team]2[***]2[hand]2
[name]是名称(随便填) [model]模型名 [team]队伍1是匪2是警 [***]性别1是男2是女(性别不同杀人提示的声音也不同)[hand]手1男2女(选择男女手模型)
记住要用ini编辑器修改,不然无法读取人物
第二步
修改cstrike\resource\UI\Classmenu_CT.res(可用TXT文本直接打开) 警队伍选人菜单(Classmenu_TER.res是匪徒队伍的)
比如要设置第15个选人健为haha,方法如下:
随便复制一个人的键位设置,如果第九健是criss葛雷斯模型,复制在任意两个键位设置中间插入黏贴,替换"Button-9-bg"("button-9-key")共四个位置为"Button-15-bg"("button-15-key")。替换所有criss为haha(共4个位置)。然后设置xpos和ypos,比较所有人物键位设置,你会发现两排人物控件左排(或右排)的所有Button-*-bg(或Button-*-key或haha)的xpos相同ypos等值增加,wide和tall相同,左右两排控件xpos相差值相同。从所设置的人物控件往下依次修正xpos和ypos(左1,3,5,7,9,11,13,15,17...:右2,4,6,8,10,12,14,16...)怕麻烦的朋友可以将控件设为最后一个控件,占用自动选择的位置,这样就只需设置这个控件和'自动选择'控件了。如下
"button-15-bg"
{
"ControlName" "ImagePanel"
"fieldName" "button-15-bg"
"xpos" "25"
"ypos" "296"
"wide" "140"
"tall" "26"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "center"
"image" "resource/control/blankslot_classmenu"
"scaleImage" "1"
}
"button-15-key"
{
"ControlName" "ImagePanel"
"fieldName" "button-15-key"
"xpos" "28"
"ypos" "299"
"wide" "20"
"tall" "20"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "center"
"image" "resource/control/keyboard"
"scaleImage" "1"
}
"haha"
{
"ControlName" "MouseOverPanelButton"
"fieldName" "haha"
"xpos" "25"
"ypos" "296"
"wide" "140"
"tall" "26"
"autoResize" "0"
"pinCorner" "2"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"labelText" "#csonst_haha"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"command" "joinclass 1;nst_choose_player haha"
}
注意四个位置haha要统一与之前INI里的[model]模型名haha一致,"xpos""ypos"是控件所在坐标
现在的这个坐标占用了“自动选择”的位置,要把“自动选择”的坐标往下移动,放在左边第9个控件,我的ypos间差28
也就是说要修改"autoselect_ct"标记内容的
"button-16-bg"
{
"ControlName" "ImagePanel"
"fieldName" "button-16-bg"
"xpos" "25"
"ypos" "324"
"wide" "140"
"tall" "26"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "center"
"image" "resource/control/blankslot_classmenu"
"scaleImage" "1"
}
"button-16-key"
{
"ControlName" "ImagePanel"
"fieldName" "button-16-key"
"xpos" "28"
"ypos" "327"
"wide" "20"
"tall" "20"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "center"
"image" "resource/control/keyboard"
"scaleImage" "1"
}
"autoselect_ct"
{
"ControlName" "MouseOverPanelButton"
"fieldName" "autoselect_ct"
"xpos" "25"
"ypos" "324"
"wide" "140"
"tall" "26"
"autoResize" "0"
"pinCorner" "2"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"labelText" "#csonst_Auto_Select"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"command" "joinclass 1;nst_choose_player autoselect_ct"
}
第三步
在cstrike\classes下随便复制一个人物的res文件(这个文件是编辑人物模型和人物图像地址的),比如criss.res,用记事本txt打开,替换里面所有的criss为哈哈,然后另存为haha.res即可,不设置会导致无法读出选人图片
第四步
cstrike\models\player下建立个名为haha的文件夹,然后把准备好的人物模型haha.mdl放进去
第五步
将选人图丢到cstrike\gfx\vgui下,例如INI设定的模型名为haha那么图片也要对应为haha.tga,选人图可用ACDSee编辑
第六步
修改人物控件名称cstrike_schinese\resource下的cstrike_schinese.txt文件(或cstrike_english.txt)
添加
cstrike版本1.5或1.6
"Cstrike_15" "15 haha的选人名称如葛雷斯"
"Cstrike_haha_Name" "haha的说明信息"
或
csonst类版本
"Csonst_15" "15 haha的选人名称如葛雷斯"
"Csonst_haha_Name" "haha的说明信息"
OK修改完成,进游戏看看
没有评论:
发表评论