________________________________________________________________________
CSO-NST加枪教学
________________________________________________________________________
part1:
spr档案放到cstrike/sprites
tga档案放到cstrike/gfx/vgu
武器声音放到cstrike/sound/weapons
武器模组放到cstrike/model
part2:
cstrike\addons\amxmodx\configs里有个nst_wpn.ini,别用记事本,用EmEditor等编辑软件打开它,在最下面写新武器的函数,格式如下:
添加普通武器,格式:
[type]1 [name] [model] [wpn_change] [damage] [speed] [zoom] [clip][ammo] [recoil] [gravity] [knockback] [cost] [sound] [team] [buy] [ auto]
添加“普通-普通”双模式武器(XM8,SCAR强化版等),格式:
[type]2 [name] [model] [wpn_change] [damage] [speed] [zoom] [clip][ammo] [recoil] [gravity] [knockback] [cost] [sound] [team] [buy] [ auto] [d_timechange_1] [d_timechange_2] [d_damage] [d_speed] [d_zoom] [d_recoil]
添加右键发动近身攻击的武器(刺刀AK等),格式:
[type]3 [name] [model] [wpn_change] [damage] [speed] [zoom] [clip][ammo] [recoil] [gravity] [knockback] [cost] [sound] [team] [buy] [ auto] [k_time] [k_radius] [k_damage] [k_deploy] [k_knockback]
添加“普通-榴弹”双模式武器,格式:
[type]4 [name] [model] [wpn_change] [damage] [speed] [zoom] [clip][ammo] [recoil] [gravity] [knockback] [cost] [sound] [team] [buy] [ auto] [l_nade] [l_costammo] [l_timechange_1] [l_timechange_2] [l_timereload] [l_knockback] [l_radius] [l_damage] [l_type]
添加不同换弹速度的武器,格式:
[type]5 [name] [model] [wpn_change] [damage] [speed] [zoom] [clip][ammo] [recoil] [gravity] [knockback] [cost] [sound] [team] [buy] [ auto] [s_timereload]
添加直接右键发射榴弹的武器,格式:
[type]6 [name] [model] [wpn_change] [damage] [speed] [zoom] [clip][ammo] [recoil] [gravity] [knockback] [cost] [sound] [team] [buy] [ auto] [lg_ammo] [lg_costammo] [lg_damage] [lg_radius] [lg_knockback]
[lg_deploy] [lg_timeattack]
添加新武器开枪前需要预热(延迟,加特林m134等),格式:
[type]7 [name] [model] [wpn_change] [damage] [speed] [zoom] [clip][ammo] [recoil] [gravity] [knockback] [cost] [sound] [team] [buy] [ auto] [m_timeready]
添加刀类武器,格式:
[type]1 [name] [model] [wpn_change]29 [damage] [gravity] [knockback] [cost] [team] [buy]
添加雷类武器,格式:
[type]1 [name] [model] [wpn_change]4 [damage] [gravity] [cost] [explode]1[size] [team] [buy]
接下来是各参数的数据:
[type]武器模式类型(1-7)【1-普通模式,2-普通-普通双模式,3-右键武器近身攻击模式,4-普通-榴弹模式,5-更改武器换弹模式,6 -右键直接发射榴弹模式, 7-武器延迟模式
[name]武器自定义名称
[model]模型名称
[change]武器原型及弹道(1-30)
1 - P228
3 - SCOUT
4 - HEGRENADE
5 - XM1014
7 - MAC10
8 - AUG
10 - ELITE
11 - FIVESEVEN
12 - UMP45
13 - SG550
14 - GALIL
15 - FAMAS
16 - USP
17 - GLOCK18
18 - AWP
19 - MP5NAVY
20 - M249
21 - M3
22 - M4A1
23 - TMP
24 - G3SG1
26 - DEAGLE
27 - SG552
28 - AK47
29 - KNIFE
30 - P90
[damage]伤害,数值为原型武器的倍数,就是说当数值为1时,武器与原型武器威力相当;数值为1.5时,武器威力为原型武器的1.5倍。
[speed]射速,数值与武器射速呈反比,值为1时为原型武器射速,值为1.5时武器射速为原型武器的0.5,值为0.5时武器射速为原型武器的2倍
[zoom]武器开启瞄准镜参数,0-关闭,1-开启单倍镜,武器原型为3、13、18或24时设为1有双倍瞄准(不然就是盲狙)
[clip]弹药匣装弹量
[ammo]后背弹药量
[recoil]武器后坐力,值为1时与原型武器后坐力相当,设为1.5时武器后坐力是原型武器的1.5倍,值为0.5时武器后坐力是原型武器的0.5倍
[gravity]装备该武器时移动速度★250为持刀速度,185为装备awp移动速度★
[knockback]武器击退距离,个人认为值为5就够了,可以为0 ★退魔圣焰击退20★
[cost]价格 0-16000
[sound]武器开枪音效,0-使用原型武器开枪音效,1-使用自定义武器开枪音效,2-双模式专用,A、B模式分别使用不同开枪音效
[team]武器所属阵营,0-双方均可购买,1-T阵营专属,2-CT阵营专属
[buy]允许以购买方式获得武器,0-不允许,只可从补给箱中随机获得;1-允许
[auto]手枪专属,新武器不是手枪时去掉这项,0-普通模式,2-左键连射模式
[d_timechange_1]模式2切换到模式1所需时间,数值以秒为单位,如5秒就是武器从模式2切换到模式1花费5秒钟
[d_timechange_2]模式1切换到模式2所需时间,同上
[d_damage]模式2武器威力倍数,设置同上
[d_speed]模式2武器射速,射速同上
[d_zoom]模式2武器是否开启瞄准镜,设置同上
[d_recoil]模式2武器后坐力,设置同上
[k_time]武器右键近身攻击延迟
[k_radius]武器右键近身攻击距离,50为普通刀有效攻击距离
[k_damage]武器右键近身攻击伤害,数值为原型刀伤害的倍数,值为2,伤害为原型刀的2倍
[k_deploy]武器右键近身攻击速度
[k_knockback]武器右键近身攻击击退距离,设置同上
[l_nade]“普通-榴弹”双模式武器装备榴弹数量
[l_costammo]榴弹价格
[l_timechange_1]榴弹模式切换到普通模式所需时间,设置同上
[l_timechange_2]普通模式切换到榴弹模式所需时间,设置同上
[l_timereload]榴弹发射间隔时间,值以秒为单位,设置同上
[l_knockback]榴弹击退距离,设置同上
[l_radius]榴弹伤害半径范围★英雄SVD伤害半径300★
[l_damage]榴弹伤害值,值为1000时榴弹伤害为1000
[l_type]榴弹模式,0-“普通-榴弹”模式互换,1-榴弹单一模式
[s_timereload]换弹匣所需时间,以秒为单位,设置同上
[lg_ammo]右键直接发射榴弹武器装备的榴弹数量
[lg_costammo]右键直接发射榴弹武器的榴弹价格
[lg_damage]右键直接发射榴弹武器的榴弹伤害,值为1000时榴弹伤害为1000
[lg_radius]右键直接发射榴弹武器的榴弹杀伤范围★标准范围300★
[lg_knockback]右键直接发射榴弹武器的榴弹击退力★标准击退20★
[lg_deploy]右键直接发射榴弹武器的榴弹间隔时间,以秒为单位,设置同上
[lg_timeattack]右键直接发射榴弹武器的榴弹发射延迟
[m_timeready]武器开枪预热时间,以秒为单位,设置同上
武器的声音文件放到cstrike\sound\weapons里,武器的模型文件放到cstrike\models\nst_wpn里,武器的音效文件、模型文件要和武器模型名称一致,例如死神的模型名称[model]是M400 ,那么开枪声音文件名称必须为m400_shoot1.wav,模型文件:p_m400.mdl,v_m400.mdl,w_m400.mdl
文件关系:[model]abc,声效:abc_shoot1.wav,模型:p_abc.mdl,v_abc.mdl,w_abc.mdl
特殊武器注意事项:
双模式武器要有两个V_*.mdl模型文件,若武器[model]是bnd,那么模式A模型文件名称:v_bnd.mdl,模型B文件名称:v_bnd_2.mdl,其他模型:w_bnd.mdl,p_bnd .mdl
如果开启了双声效【 [sound]2 】,bnd_shoot1.wav为模式A武器开枪声效,bnd_shoot2.mdl为模式B武器开枪声效
“普通-榴弹”双模式武器同上,需要v_*.mdl,v_*_2.mdl两个V模型文件,
*_shoot1.wav为武器普通模式下开枪声效,*_shoot2.wav为发射榴弹的声效,*_launcher.wav为榴弹爆炸音效,v_*.mdl为普通模式武器V模型,v_*_2.mdl为榴弹模式武器模型,还需要一个榴弹模型s_*.mdl放入cstrike\models\nst_wpn内,榴弹爆炸效果动画文件*_exp.spr放入cstrike\sprites\nst_wpn内。例如
武器[model]是akm,V模型普通、榴弹模式分别为:v_akm.mdl,v_akm_2.mdl,普通音效:akm_shoot1.wav,榴弹发射音效:akm_shoot2.wav,榴弹爆炸音效:akm_launcher.wav,榴弹模型s_akm .mdl,榴弹爆炸动画:akm_exp.spr
直接右键发射榴弹的武器需要在cstrike\sprites\nst_wpn内放入*_lg_exp.spr
文件,*_shoot1.wav为武器普通射击音效,*_lg_fire.wav为武器榴弹发射音效,*_lg_exp.wav为榴弹爆炸音效。例如武器[model]是asd,那么武器普通射击音效是asd_shoot1.wav,武器榴弹发射音效是asd_lg_fire.wav,榴弹爆炸音效是asd_lg_exp.wav,榴弹爆炸动画:asd_lg_exp.wav
换弹速度改变的武器的V模型需要经过处理,不然上弹药的动作会变乱。
还有,这点最重要,无论添加什么模型都要加在CSO-NST\cstrike\models\nst_wpn里,而且要P,W,V 三个mdl都有进入游戏才不会出现错误,最后如果大家想跑得快点的话,在wpn.ini里找到[gravity]这一项,把他后面的数值调大一点就可以跑得很快了.
part3:
完成了part1之后到CSO-NST/cstrike/resource/UI.
先找NSTWpn_(A)_(B)_(C)
A=Rifles(步枪),Pistols(手枪),Knife(小刀),Hegrenade(手榴弹)
B=步枪是3,其他是1
C=CT/TER
part4:
ps:请先用EmEditor来开启
开启后,去到最下
然后在
// #######################################################################
"CancelButton-bg"
{
"ControlName" "ImagePanel"
"fieldName" "CancelButton-bg"
"xpos" "474"
"ypos" "40"
"wide" "138"
"tall" "26"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "center"
"image" "resource/control/blank_slot"
"scaleImage" "1"
}
"CancelButton-key"
{
"ControlName" "ImagePanel"
"fieldName" "CancelButton-key"
"xpos" "476"
"ypos" "43"
"wide" "20"
"tall" "20"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "center"
"image" "resource/control/keyboard"
"scaleImage" "1"
}
"CancelButton"
{
"ControlName" "MouseOverPanelButton"
"fieldName" "CancelButton"
"xpos" "474"
"ypos" "40"
"wide" "138"
"tall" "26"
"autoResize" "0"
"pinCorner" "2"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"labelText" "#csonst_Cancel"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"Command" "vguicancel"
"Default" "1"
}
}
上面打上
// ---------------------- weapon X ----------------------
"1-weaponX-bg"
{
"ControlName" "ImagePanel"
"fieldName" "1-weaponX-bg"
"xpos" "30"
"ypos" "377"
"wide" "138"
"tall" "63"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "center"
"image" "resource/control/item_bg"
"scaleImage" "1"
}
"1-weaponX-bgwpn"
{
"ControlName" "ImagePanel"
"fieldName" "1-weaponX-bgwpn"
"xpos" "30"
"ypos" "377"
"wide" "138"
"tall" "48"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "center"
"image" "resource/control/item_bgwpn"
"scaleImage" "1"
}
"1-weaponX-img"
{
"ControlName" "ImagePanel"
"fieldName" "1-weaponX-img"
"xpos" "30"
"ypos" "377"
"wide" "138"
"tall" "48"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "center"
// 1-weaponX-img
"image" "gfx/vgui/枪枝预览图的名子"
"scaleImage" "1"
}
"1-weaponX-team"
{
"ControlName" "ImagePanel"
"fieldName" "1-weaponX-team"
"xpos" "140"
"ypos" "418"
"wide" "26"
"tall" "7"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "center"
// 1-weaponX-team
"image" "resource/control/team0"
"scaleImage" "1"
}
"1-weaponX-name"
{
"ControlName" "Label"
"fieldName" "1-weaponX-name"
"xpos" "30"
"ypos" "423"
"wide" "138"
"tall" "15"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
// 1-weaponX-name
"labelText" "枪的名子"
"textAlignment" "center"
"dulltext" "1"
"brighttext" "0"
}
"1-weaponX-bottom"
{
"ControlName" "Button"
"fieldName" "1-weaponX-bottom"
"xpos" "30"
"ypos" "377"
"wide" "138"
"tall" "63"
"autoResize" "0"
"pinCorner" "2"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"labelText" ""
// 1-weaponX-bottom
"command" "nst_buy_wpn 模组的名子"
}
X=18(因为现再第三页只有到17而以 如果是第18枝枪 那就打19,以此类推)
请不要储存住
按档案,按另存新档,编码用UTF-8[未含],然后储存,然后取代.
完成啰~