羊吃狼 Posted 2005年10月10日 13:23 Posted 2005年10月10日 13:23 老大:论坛上加入全部武器有了,俺的想法是:如何在特定的一张地图中去掉某种武器?譬如在奥马哈地图中,基本上有80%的选德军,而德军中又会有80%的选狙击枪,可怜的几个盟军大都被阴在海滩上。这和实际的诺曼底登陆相去甚远。所以俺想在OBJ-3中去掉狙,为盟军成功登陆诺曼底创造条件,也为反法西斯的胜利做一点贡献!
S-22 Posted 2005年10月10日 14:16 Posted 2005年10月10日 14:16 可以考虑在地图的 tik 文件里面加上 $local.player takeweapon 武器名称 试试。 或者参考 SOF2 里面的一种方法,但我不知道是否仅适用于 sof2 的 osp 模式。 包括命令等等都不同,需要替换成 mohaa 的相关命令。 列了 2 组地图,你可以照着这个自己研究一下。 服务器配置文件里: seta sv_mapcycle "mapcycle.txt" mapcycle 地图列表文件的内容: mapcycle { map1 { Command "map mp_jor1" cvars { g_motd "^1Now: Jor1 Dem, Next: HK2 CTF" g_gametype "dem" gt_bombDefuseTime "7" gt_bombFuseTime "45" gt_bombPlantTime "4" dmflags "16" g_roundjointime "3" timelimit "25" capturelimit "8" g_speed "300" scorelimit "20" g_pickupsdisabled "0" g_gravity "800" disable_weapon_knife "0" disable_pickup_weapon_US_SOCOM "0" disable_pickup_weapon_M19 "0" disable_pickup_weapon_silvertalon "0" disable_pickup_weapon_microuzi "0" disable_pickup_weapon_M3A1 "0" disable_pickup_weapon_MP5 "0" disable_pickup_weapon_USAS_12 "1" disable_pickup_weapon_M590 "0" disable_pickup_weapon_MSG90A1 "0" disable_pickup_weapon_M4 "0" disable_pickup_weapon_AK_74 "0" disable_pickup_weapon_SIG551 "0" disable_pickup_weapon_M60 "0" disable_pickup_weapon_RPG_7 "1" disable_pickup_weapon_MM_1 "1" disable_pickup_weapon_M84 "0" disable_pickup_weapon_SMOHG92 "0" disable_pickup_weapon_AN_M14 "1" disable_pickup_weapon_M15 "0" } } map2 { Command "map mp_hk2" cvars { g_motd "^1Now: HK2 CTF, Next: RMG Dersert CTF" g_gametype "ctf" timelimit "35" capturelimit "8" dmflags "16" g_speed "300" scorelimit "20" g_pickupsdisabled "0" g_gravity "800" disable_weapon_knife "0" disable_pickup_weapon_US_SOCOM "0" disable_pickup_weapon_M19 "0" disable_pickup_weapon_silvertalon "0" disable_pickup_weapon_microuzi "0" disable_pickup_weapon_M3A1 "0" disable_pickup_weapon_MP5 "0" disable_pickup_weapon_USAS_12 "1" disable_pickup_weapon_M590 "0" disable_pickup_weapon_MSG90A1 "0" disable_pickup_weapon_M4 "0" disable_pickup_weapon_AK_74 "0" disable_pickup_weapon_SIG551 "0" disable_pickup_weapon_M60 "1" disable_pickup_weapon_RPG_7 "1" disable_pickup_weapon_MM_1 "1" disable_pickup_weapon_M84 "0" disable_pickup_weapon_SMOHG92 "0" disable_pickup_weapon_AN_M14 "1" disable_pickup_weapon_M15 "0" } } } 我好久没研究脚本了,你可以问问 liu8888 。
moh8888 Posted 2005年10月14日 06:52 Posted 2005年10月14日 06:52 在TIK中 加入 server { //在这一行下加入 local.map = getcvar "mapname" if(local.map=="obj/obj_team3") { self remove end }[/code] 俺没有TEST,应NO QUESTION
羊吃狼 Posted 2005年10月18日 02:32 Author Posted 2005年10月18日 02:32 在TIK中 加入 server { //在这一行下加入 local.map = getcvar "mapname" if(local.map=="obj/obj_team3") { self remove end } 俺没有TEST,应NO QUESTION 俺的意思是:只在某一张地图中去掉一种武器(比如只在mohdm 1中去掉KAR 98,换地图后仍有KAR 98),不知行否?你给的程序好像没有武器的名称,不知去的是什么,劳驾8888再给看看!
moh8888 Posted 2005年10月18日 08:43 Posted 2005年10月18日 08:43 上面就是说删掉TIK 下面是俺的另一个方法 在OBJ3中加入指令give_m1 将所有持K98的变成M1 give_m1: while (1) { for (local.dude = 1;local.dude { local.randnum = randomint 1000 $player[local.dude] weaponcommand dual targetname ("weap" + local.randnum) local.weap = $("weap" + local.randnum) if (local.weap) { switch (local.weap.model) { case "models/weapons/kar98.tik": //假如是kar98 $player[local.dude] give weapons/m1_garand.tik //改为M1 break case "models/weapons/....": //假如是... $player[local.dude] give weapons/m1_garand.tik //改为M1 break case "models/weapons/xxx": //假如是xxx $player[local.dude] give weapons/m1_garand.tik //改为M1 break } local.weap.targetname = "" } } wait 5 } end 还是那句话....NO TEST
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new account登录
Already have an account? Sign in here.
现在登录