引用 | 編輯
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 |