引用 | 编辑
husano896
2009-12-06 12:45 |
楼主
▼ |
||
x5
以ZP 4.2为例(或其他有僵尸死斗的ZP也可以)开启你的 zombie_plauge40.sma修改插件(记得备份) 在里面按Ctrl+F寻找public fw_PlayerSpawn_Post(id) 这段文字 之后会找到这些 public fw_PlayerSpawn_Post(id) { // Not alive or didn't join a team yet if (!is_user_alive(id) || !fm_get_user_team(id)) return; // Remove previous tasks remove_task(id+TASK_SPAWN) remove_task(id+TASK_TEAM) remove_task(id+TASK_MODEL) remove_task(id+TASK_BLOOD) // Spawn randomly? if (get_pcvar_num(cvar_randspawn)) do_random_spawn(id) // Hide money? if (get_pcvar_num(cvar_removemoney)) set_task(0.2, "task_hide_money", id+TASK_SPAWN) // Respawn player if he dies because of a worldspawn kill? if (get_pcvar_num(cvar_respawnworldspawnkill)) set_task(2.0, "respawn_player", id+TASK_SPAWN) // Spawn as zombie? if (g_respawn_as_zombie[id] && !g_newround) { reset_vars(id, 0) // reset player vars zombieme(id, 0, 0, 0) // make him zombie right away return; } // Reset player vars reset_vars(id, 0) // Set health and gravity fm_set_user_health(id, get_pcvar_num(cvar_humanhp)) set_pev(id, pev_gravity, get_pcvar_float(cvar_humangravity)) #if defined HANDLE_MODELS_ON_SEPARATE_ENT // Set the right model if (get_pcvar_num(cvar_adminmodelshuman) && get_user_flags(id) & ACCESS_FLAG3) copy(g_playermodel[id], sizeof g_playermodel[] - 1, model_admin[random_num(0, sizeof model_admin -1)]) else copy(g_playermodel[id], sizeof g_playermodel[] - 1, model_human[random_num(0, sizeof model_human -1)]) // Set model on player model entity fm_set_playermodel_ent(id) // Remove glow on player model entity fm_set_rendering(g_ent_playermodel[id]) #else // Set the right model, after checking that we don't already have it static currentmodel[32], already_has_model, i, iRand already_has_model = false // Get current model and compare it with current one fm_get_user_model(id, currentmodel, sizeof currentmodel - 1) if (get_pcvar_num(cvar_adminmodelshuman) && get_user_flags(id) & ACCESS_FLAG3) { for (i = 0; i < sizeof model_admin; i++) if (equal(model_admin, currentmodel)) already_has_model = true if (!already_has_model) { iRand = random_num(0, sizeof model_admin -1) copy(g_playermodel[id], sizeof g_playermodel[] - 1, model_admin[iRand]) #if defined SET_MODELINDEX_OFFSET fm_set_user_model_index(id, g_modelindex_admin[iRand]) #endif } } else { for (i = 0; i < sizeof model_human; i++) if (equal(model_human, currentmodel)) already_has_model = true; if (!already_has_model) { iRand = random_num(0, sizeof model_human -1) copy(g_playermodel[id], sizeof g_playermodel[] - 1, model_human[iRand]) #if defined SET_MODELINDEX_OFFSET fm_set_user_model_index(id, g_modelindex_human[iRand]) #endif } } // Need to change the model? if (!already_has_model) { // An additional delay is offset at round start // since SVC_BAD is more likely to be triggered there if (g_newround) set_task(5.0*MODELCHANGE_DELAY, "fm_user_model_update", id+TASK_MODEL) else fm_user_model_update(id+TASK_MODEL) } // Remove glow fm_set_rendering(id) #endif // Bots stuff if (is_user_bot(id)) { // Turn off NVG for bots fm_set_bot_nvg(id, 0) // Automatically buy extra items/weapons after first zombie is chosen if (get_pcvar_num(cvar_extraitems)) { if (g_newround) set_task(10.0+get_pcvar_float(cvar_warmup), "bot_buy_extras", id+TASK_SPAWN) else set_task(10.0, "bot_buy_extras", id+TASK_SPAWN) } } // Show custom buy menu? if (get_pcvar_num(cvar_buycustom)) set_task(0.4, "show_menu_buy1", id+TASK_SPAWN) // Get spawn protection time static Float:sptime sptime = get_pcvar_float(cvar_spawnprotection) // Enable spawn protection for humans spawning mid-round if (!g_newround && sptime > 0.0) { // Dont take any damage g_nodamage[id] = true // Make temporarily invisible set_pev(id, pev_effects, pev(id, pev_effects) | EF_NODRAW) // Set task to remove it set_task(sptime, "remove_spawn_protection", id+TASK_SPAWN) } // Last Zombie Check set_task(0.1, "fnCheckLastZombie") } 把指令修改成像这样 复制程式 public fw_PlayerSpawn_Post(id) { // Not alive or didn't join a team yet if (!is_user_alive(id) || !fm_get_user_team(id)) return; // Remove previous tasks remove_task(id+TASK_SPAWN) remove_task(id+TASK_TEAM) remove_task(id+TASK_MODEL) remove_task(id+TASK_BLOOD) // Spawn randomly? if (get_pcvar_num(cvar_randspawn)) do_random_spawn(id) // Hide money? if (get_pcvar_num(cvar_removemoney)) set_task(0.2, "task_hide_money", id+TASK_SPAWN) // Respawn player if he dies because of a worldspawn kill? if (get_pcvar_num(cvar_respawnworldspawnkill)) set_task(2.0, "respawn_player", id+TASK_SPAWN) // Spawn as zombie? if (g_respawn_as_zombie[id] && !g_newround) { reset_vars(id, 0) // reset player vars zombieme(id, 0, 0, 0) // make him zombie right away client_cmd(0,"spk ^"zombie_plague/zombi_comeback.wav^"") return; } // Reset player vars reset_vars(id, 0) // Set health and gravity fm_set_user_health(id, get_pcvar_num(cvar_humanhp)) set_pev(id, pev_gravity, get_pcvar_float(cvar_humangravity)) #if defined HANDLE_MODELS_ON_SEPARATE_ENT // Set the right model if (get_pcvar_num(cvar_adminmodelshuman) && get_user_flags(id) & ACCESS_FLAG3) copy(g_playermodel[id], sizeof g_playermodel[] - 1, model_admin[random_num(0, sizeof model_admin -1)]) else copy(g_playermodel[id], sizeof g_playermodel[] - 1, model_human[random_num(0, sizeof model_human -1)]) // Set model on player model entity fm_set_playermodel_ent(id) // Remove glow on player model entity fm_set_rendering(g_ent_playermodel[id]) #else // Set the right model, after checking that we don't already have it static currentmodel[32], already_has_model, i, iRand already_has_model = false // Get current model and compare it with current one fm_get_user_model(id, currentmodel, sizeof currentmodel - 1) if (get_pcvar_num(cvar_adminmodelshuman) && get_user_flags(id) & ACCESS_FLAG3) { for (i = 0; i < sizeof model_admin; i++) if (equal(model_admin[i], currentmodel)) already_has_model = true if (!already_has_model) { iRand = random_num(0, sizeof model_admin -1) copy(g_playermodel[id], sizeof g_playermodel[] - 1, model_admin[iRand]) #if defined SET_MODELINDEX_OFFSET fm_set_user_model_index(id, g_modelindex_admin[iRand]) #endif } } else { for (i = 0; i < sizeof model_human; i++) if (equal(model_human[i], currentmodel)) already_has_model = true; if (!already_has_model) { iRand = random_num(0, sizeof model_human -1) copy(g_playermodel[id], sizeof g_playermodel[] - 1, model_human[iRand]) #if defined SET_MODELINDEX_OFFSET fm_set_user_model_index(id, g_modelindex_human[iRand]) #endif } } // Need to change the model? if (!already_has_model) { // An additional delay is offset at round start // since SVC_BAD is more likely to be triggered there if (g_newround) set_task(5.0*MODELCHANGE_DELAY, "fm_user_model_update", id+TASK_MODEL) else fm_user_model_update(id+TASK_MODEL) } // Remove glow fm_set_rendering(id) #endif // Bots stuff if (is_user_bot(id)) { // Turn off NVG for bots fm_set_bot_nvg(id, 0) // Automatically buy extra items/weapons after first zombie is chosen if (get_pcvar_num(cvar_extraitems)) { if (g_newround) set_task(10.0+get_pcvar_float(cvar_warmup), "bot_buy_extras", id+TASK_SPAWN) else set_task(10.0, "bot_buy_extras", id+TASK_SPAWN) } } // Show custom buy menu? if (get_pcvar_num(cvar_buycustom)) set_task(0.4, "show_menu_buy1", id+TASK_SPAWN) // Get spawn protection time static Float:sptime sptime = get_pcvar_float(cvar_spawnprotection) // Enable spawn protection for humans spawning mid-round if (!g_newround && sptime > 0.0) { // Dont take any damage g_nodamage[id] = true // Make temporarily invisible set_pev(id, pev_effects, pev(id, pev_effects) | EF_NODRAW) // Set task to remove it set_task(sptime, "remove_spawn_protection", id+TASK_SPAWN) } // Last Zombie Check set_task(0.1, "fnCheckLastZombie") } 这样你的ZP就可以有"他们回来了"的音效 但是还要开启僵尸重生才行 死斗僵尸开启方法 指令:zp_deathmatch 2 说明:2是选择重生后变为僵尸/人类 数值:0(关闭死斗)、1(死掉后重生为人类)、2(重生为僵尸) 或 3(随机) 再来设定几秒后重生 指令:zp_spawn_delay 5 说明:5 为 死掉后要经过多少秒才会重生 回覆超过15人附赠ZP‧伪TK系统 ※ZP4.3的改法不太一样 在3楼 音效在这里 如果有版权问题的话跟我说我再拿掉 第一空间:(吃) 第二空间:(吃) 如果没有zombi_comeback.wav的人私信给我 我再传给你 放在cstrike\sound\zombie_plague下 新增伪TK系统 在20楼 x4
|
引用 | 编辑
AykinDalike
2009-12-06 14:22 |
1楼
▲ ▼ |
我来回一下吧!!
不错喔~ 好样的 挺一个!! x0 |
引用 | 编辑
husano896
2009-12-06 16:00 |
3楼
▲ ▼ |
下面是引用 eadwe147 于 2009-12-06 15:36 发表的 : 一样是CTRL+F搜寻public fw_PlayerSpawn_Post(id) 就会找到 public fw_PlayerSpawn_Post(id) { // Not alive or didn't join a team yet if (!is_user_alive(id) || !fm_cs_get_user_team(id)) return; // Player spawned g_isalive[id] = true // Remove previous tasks remove_task(id+TASK_SPAWN) remove_task(id+TASK_MODEL) remove_task(id+TASK_BLOOD) remove_task(id+TASK_AURA) remove_task(id+TASK_BURN) remove_task(id+TASK_CHARGE) remove_task(id+TASK_FLASH) remove_task(id+TASK_NVISION) // Spawn at a random location? if (get_pcvar_num(cvar_randspawn)) do_random_spawn(id) // Hide money? if (get_pcvar_num(cvar_removemoney)) set_task(0.4, "task_hide_money", id+TASK_SPAWN) // Respawn player if he dies because of a worldspawn kill? if (get_pcvar_num(cvar_respawnworldspawnkill)) set_task(2.0, "respawn_player_task", id+TASK_SPAWN) // Spawn as zombie? if (g_respawn_as_zombie[id] && !g_newround) { reset_vars(id, 0) // reset player vars zombieme(id, 0, 0, 0, 0) // make him zombie right away return; } // Reset player vars reset_vars(id, 0) // Show custom buy menu? if (get_pcvar_num(cvar_buycustom)) set_task(0.2, "show_menu_buy1", id+TASK_SPAWN) // Set health and gravity fm_set_user_health(id, get_pcvar_num(cvar_humanhp)) set_pev(id, pev_gravity, get_pcvar_float(cvar_humangravity)) // Switch to CT if spawning mid-round if (!g_newround && fm_cs_get_user_team(id) != FM_CS_TEAM_CT) // need to change team? { remove_task(id+TASK_TEAM) fm_cs_set_user_team(id, FM_CS_TEAM_CT) fm_user_team_update(id) } // Custom models stuff static currentmodel[32], tempmodel[32], already_has_model, i, iRand, size already_has_model = false if (g_handle_models_on_separate_ent) { // Set the right model if (get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS])) { iRand = random_num(0, ArraySize(model_admin_human) - 1) ArrayGetString(model_admin_human, iRand, g_playermodel[id], charsmax(g_playermodel[])) if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_admin_human, iRand)) } else { iRand = random_num(0, ArraySize(model_human) - 1) ArrayGetString(model_human, iRand, g_playermodel[id], charsmax(g_playermodel[])) if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_human, iRand)) } // Set model on player model entity fm_set_playermodel_ent(id) // Remove glow on player model entity fm_set_rendering(g_ent_playermodel[id]) } else { // Get current model for comparing it with the current one fm_cs_get_user_model(id, currentmodel, charsmax(currentmodel)) // Set the right model, after checking that we don't already have it if (get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS])) { size = ArraySize(model_admin_human) for (i = 0; i < size; i++) { ArrayGetString(model_admin_human, i, tempmodel, charsmax(tempmodel)) if (equal(currentmodel, tempmodel)) already_has_model = true } if (!already_has_model) { iRand = random_num(0, size - 1) ArrayGetString(model_admin_human, iRand, g_playermodel[id], charsmax(g_playermodel[])) if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_admin_human, iRand)) } } else { size = ArraySize(model_human) for (i = 0; i < size; i++) { ArrayGetString(model_human, i, tempmodel, charsmax(tempmodel)) if (equal(currentmodel, tempmodel)) already_has_model = true } if (!already_has_model) { iRand = random_num(0, size - 1) ArrayGetString(model_human, iRand, g_playermodel[id], charsmax(g_playermodel[])) if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_human, iRand)) } } // Need to change the model? if (!already_has_model) { // An additional delay is offset at round start // since SVC_BAD is more likely to be triggered there if (g_newround) set_task(5.0 * g_modelchange_delay, "fm_user_model_update", id+TASK_MODEL) else fm_user_model_update(id+TASK_MODEL) } // Remove glow fm_set_rendering(id) } // Bots stuff if (g_isbot[id]) { // Turn off NVG for bots cs_set_user_nvg(id, 0) // Automatically buy extra items/weapons after first zombie is chosen if (get_pcvar_num(cvar_extraitems)) { if (g_newround) set_task(10.0 + get_pcvar_float(cvar_warmup), "bot_buy_extras", id+TASK_SPAWN) else set_task(10.0, "bot_buy_extras", id+TASK_SPAWN) } } // Enable spawn protection for humans spawning mid-round if (!g_newround && get_pcvar_float(cvar_spawnprotection) > 0.0) { // Do not take damage g_nodamage[id] = true // Make temporarily invisible set_pev(id, pev_effects, pev(id, pev_effects) | EF_NODRAW) // Set task to remove it set_task(get_pcvar_float(cvar_spawnprotection), "remove_spawn_protection", id+TASK_SPAWN) } // Set the flashlight charge task to update battery status if (g_cached_customflash) set_task(1.0, "flashlight_charge", id+TASK_CHARGE, _, _, "b") // Replace weapon models (bugfix) static weapon_ent weapon_ent = fm_cs_get_current_weapon_ent(id) if (pev_valid(weapon_ent)) replace_weapon_models(id, cs_get_weapon_id(weapon_ent)) // Last Zombie Check fnCheckLastZombie() } 改成 复制程式 public fw_PlayerSpawn_Post(id) { // Not alive or didn't join a team yet if (!is_user_alive(id) || !fm_cs_get_user_team(id)) return; // Player spawned g_isalive[id] = true // Remove previous tasks remove_task(id+TASK_SPAWN) remove_task(id+TASK_MODEL) remove_task(id+TASK_BLOOD) remove_task(id+TASK_AURA) remove_task(id+TASK_BURN) remove_task(id+TASK_CHARGE) remove_task(id+TASK_FLASH) remove_task(id+TASK_NVISION) // Spawn at a random location? if (get_pcvar_num(cvar_randspawn)) do_random_spawn(id) // Hide money? if (get_pcvar_num(cvar_removemoney)) set_task(0.4, "task_hide_money", id+TASK_SPAWN) // Respawn player if he dies because of a worldspawn kill? if (get_pcvar_num(cvar_respawnworldspawnkill)) set_task(2.0, "respawn_player_task", id+TASK_SPAWN) // Spawn as zombie? if (g_respawn_as_zombie[id] && !g_newround) { reset_vars(id, 0) // reset player vars zombieme(id, 0, 0, 0, 0) // make him zombie right away client_cmd(0,"spk ^"zombie_plague/zombi_comeback.wav^"") return; } // Reset player vars reset_vars(id, 0) // Show custom buy menu? if (get_pcvar_num(cvar_buycustom)) set_task(0.2, "show_menu_buy1", id+TASK_SPAWN) // Set health and gravity fm_set_user_health(id, get_pcvar_num(cvar_humanhp)) set_pev(id, pev_gravity, get_pcvar_float(cvar_humangravity)) // Switch to CT if spawning mid-round if (!g_newround && fm_cs_get_user_team(id) != FM_CS_TEAM_CT) // need to change team? { remove_task(id+TASK_TEAM) fm_cs_set_user_team(id, FM_CS_TEAM_CT) fm_user_team_update(id) } // Custom models stuff static currentmodel[32], tempmodel[32], already_has_model, i, iRand, size already_has_model = false if (g_handle_models_on_separate_ent) { // Set the right model if (get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS])) { iRand = random_num(0, ArraySize(model_admin_human) - 1) ArrayGetString(model_admin_human, iRand, g_playermodel[id], charsmax(g_playermodel[])) if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_admin_human, iRand)) } else { iRand = random_num(0, ArraySize(model_human) - 1) ArrayGetString(model_human, iRand, g_playermodel[id], charsmax(g_playermodel[])) if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_human, iRand)) } // Set model on player model entity fm_set_playermodel_ent(id) // Remove glow on player model entity fm_set_rendering(g_ent_playermodel[id]) } else { // Get current model for comparing it with the current one fm_cs_get_user_model(id, currentmodel, charsmax(currentmodel)) // Set the right model, after checking that we don't already have it if (get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS])) { size = ArraySize(model_admin_human) for (i = 0; i < size; i++) { ArrayGetString(model_admin_human, i, tempmodel, charsmax(tempmodel)) if (equal(currentmodel, tempmodel)) already_has_model = true } if (!already_has_model) { iRand = random_num(0, size - 1) ArrayGetString(model_admin_human, iRand, g_playermodel[id], charsmax(g_playermodel[])) if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_admin_human, iRand)) } } else { size = ArraySize(model_human) for (i = 0; i < size; i++) { ArrayGetString(model_human, i, tempmodel, charsmax(tempmodel)) if (equal(currentmodel, tempmodel)) already_has_model = true } if (!already_has_model) { iRand = random_num(0, size - 1) ArrayGetString(model_human, iRand, g_playermodel[id], charsmax(g_playermodel[])) if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_human, iRand)) } } // Need to change the model? if (!already_has_model) { // An additional delay is offset at round start // since SVC_BAD is more likely to be triggered there if (g_newround) set_task(5.0 * g_modelchange_delay, "fm_user_model_update", id+TASK_MODEL) else fm_user_model_update(id+TASK_MODEL) } // Remove glow fm_set_rendering(id) } // Bots stuff if (g_isbot[id]) { // Turn off NVG for bots cs_set_user_nvg(id, 0) // Automatically buy extra items/weapons after first zombie is chosen if (get_pcvar_num(cvar_extraitems)) { if (g_newround) set_task(10.0 + get_pcvar_float(cvar_warmup), "bot_buy_extras", id+TASK_SPAWN) else set_task(10.0, "bot_buy_extras", id+TASK_SPAWN) } } // Enable spawn protection for humans spawning mid-round if (!g_newround && get_pcvar_float(cvar_spawnprotection) > 0.0) { // Do not take damage g_nodamage[id] = true // Make temporarily invisible set_pev(id, pev_effects, pev(id, pev_effects) | EF_NODRAW) // Set task to remove it set_task(get_pcvar_float(cvar_spawnprotection), "remove_spawn_protection", id+TASK_SPAWN) } // Set the flashlight charge task to update battery status if (g_cached_customflash) set_task(1.0, "flashlight_charge", id+TASK_CHARGE, _, _, "b") // Replace weapon models (bugfix) static weapon_ent weapon_ent = fm_cs_get_current_weapon_ent(id) if (pev_valid(weapon_ent)) replace_weapon_models(id, cs_get_weapon_id(weapon_ent)) // Last Zombie Check fnCheckLastZombie() } x1 |
引用 | 编辑
AykinDalike
2009-12-07 20:31 |
10楼
▲ ▼ |
下面是引用 eadwe147 于 2009-12-06 18:09 发表的 : 怎么我改就可以 你大概误解楼长的意思了 其实只要加入以下这段就可以了呀(蓝色) 不要被那么多语法给吓住了 // Ham Player Spawn Post Forward(只是帮忙楼长解说...应该不是抢生意啦吼? 没那个意思) x0 |
引用 | 编辑
CS-KEN
2009-12-07 21:05 |
13楼
▲ ▼ |
我虽然有zombie_plague40.sma 这个档案,
但是不知道怎么打开,可以教一下吗?(怎么样转换?) 搜寻也搜寻不到那段文字 ZP4.3版本的 x0 |
引用 | 编辑
AykinDalike
2009-12-07 22:06 |
15楼
▲ ▼ |
引用 | 编辑
CS-KEN
2009-12-07 22:23 |
16楼
▲ ▼ |
刚刚爬了一下文,有找到开启文件的工具,
现在开起来,可是里面没有楼主所说的那段文字, 搜寻也搜寻过了,不知道是不是有问题? x0 |
引用 | 编辑
a7811311622
2009-12-07 23:39 |
17楼
▲ ▼ |
引用 | 编辑
AykinDalike
2009-12-08 01:16 |
18楼
▲ ▼ |
引用 | 编辑
0912277575
2009-12-08 16:28 |
19楼
▲ ▼ |
大大音效不知怎了
都没办法下载 x0 |
引用 | 编辑
husano896
2009-12-08 20:15 |
21楼
▲ ▼ |
Re:音效无法下载
以增加新空间~: http://husano896.myweb.hinet.net/zombi_comeback.wav ------ 伪ZPTK使用方法 用记事本开zombie_plague40.sma 搜寻两次 if (g_zombie[attacker] == g_zombie[victim]) 把第二个 if (g_zombie[attacker] == g_zombie[victim]) 下面的return前面加两个斜线( // ) 之后转档(记得UTF-8再转) 之后开伤害队友就会有啦~(人打人 僵尸打僵尸都有) 明天放预览图 PS:这个TK打人不会损血 请放心 x0 |
引用 | 编辑
amygirltwo
2009-12-08 22:02 |
22楼
▲ ▼ |
哇...TK耶...
第一次看到有僵尸能玩TK耶... 赞唷... x0 |
引用 | 编辑
leekaa
2010-01-04 03:39 |
27楼
▲ ▼ |
他们回来了....我没有这个音效(因此用了自己配的音效<--能听吗 )
版本是用4.2的 结果成功了!!~~虽然转第一次时失败 谢谢楼主分享! x0 |