Good Evening. I'm waiting for alliedmods so much time for help but nobody answering, well i'll try to gain help maybe there. Actually i'm using zp_sub_rewards but author forget about swarm mode. I would like to add a two rewards exacly in this mode. I mean zombie will get 2 ammo packs if kill humans and humans gain 1 ammo pack for every killed zombie Its for me the most important and really want to do that.
I want to change something else but maybe i'll ask if you help me with first problem
I'll appreciate for any helps and thanks you for reading !
Hello and nice to meet you, So returning to topic sure no problem but i didn't change anything, basicly its clear include whose you can find in alliedmods.
public plugin_precache() { cvar_toggle = register_cvar("zp_rewards", "1") // Turned on/off
cvar_nks_round = register_cvar("zp_rewards_nks_round", "0") // Only in Plague round cvar_nks_ampks = register_cvar("zp_rewards_nks", "3") // Nemesis kills Survivor
cvar_skn_round = register_cvar("zp_rewards_skn_round", "0") // Only in Plague round cvar_skn_ampks = register_cvar("zp_rewards_skn", "3") // Survivor kills Nemesis cvar_sknk_ampks = register_cvar("zp_rewards_sknk", "25") // Survivor kills Nemesis with knife
cvar_zks_round = register_cvar("zp_rewards_zks_round", "0") // Only in Survivor Round cvar_skzk_ampks = register_cvar("zp_rewards_skzk", "15") // Survivor kills Zombie with knife cvar_zks_ampks = register_cvar("zp_rewards_zks", "35") // Zombie Kills Survivor
cvar_hkn_round = register_cvar("zp_rewards_hkn_round", "0") // Only in Nemesis round cvar_hkn_ampks = register_cvar("zp_rewards_hkn", "35") // Human kills Nemesis cvar_hknk_ampks = register_cvar("zp_rewards_hknk", "75") // Human kills Nemesis with knife
cvar_hkzk_ampks = register_cvar("zp_rewards_hkzk", "25") // Human kills Zombie with knife cvar_hkfzk_ampks = register_cvar("zp_rewards_hkfzk", "25") // Human kills first Zombie with knife cvar_hklzk_ampks = register_cvar("zp_rewards_hklzk", "25") // Human kills last Zombie with knife cvar_nzkih_show = register_cvar("zp_rewards_nzkih_show", "1") // Nemesis/Zombie kills/infects a Human cvar_nzkih_ampks = get_cvar_num("zp_zombie_infect_reward") // Find out how many ammo packs a Nemesis/Zombie gets for killing/infecting a Human }
public plugin_cfg() { // Plugin is disabled if (!get_pcvar_num(cvar_toggle)) return;
// Get configs dir new cfgdir[32] get_configsdir(cfgdir, charsmax(cfgdir))
// Ham Player Killed Forward public fw_PlayerKilled_Post(victim, attacker, shouldgib) { // Plugin is disabled if (!get_pcvar_num(cvar_toggle)) return;
// Make sure it's a real knife kill const m_bitsDamageType = 76
// Get deathmatch mode status and whether the player killed himself static selfkill selfkill = (victim == attacker || !is_user_connected(attacker)) ? true : false
// Killed by a non-player entity or self killed if (selfkill) return;
// Get attacker and victim's name static aname[32], vname[32] get_user_name(attacker, aname, 31) get_user_name(victim, vname, 31)
if(zp_is_swarm_round()) { if (zp_get_user_zombie(victim)) { zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + 1) zp_colored_print(0, "^x04[ZP]^x01 %s recieve 1 AP for killing %s", aname, vname) } else { zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + 2) zp_colored_print(0, "^x04[ZP]^x01 %s recieve 2 AP for killing %s", aname, vname) } } else { // A Zombie was killed if (zp_get_user_zombie(victim)) { // Victim was Nemesis. What?! He's a Zombie too, you know? if (zp_get_user_nemesis(victim)) { // Survivor's frag if (zp_get_user_survivor(attacker)) { // He gets enough ammo packs allready if (!zp_is_plague_round() && get_pcvar_num(cvar_skn_round)) return;
// He knifed the Nemesis if (get_user_weapon(attacker) == CSW_KNIFE && get_pdata_int(victim, m_bitsDamageType) == (DMG_BULLET | DMG_NEVERGIB)) { // Option disabled if (!get_pcvar_num(cvar_sknk_ampks)) return;
// Award him zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_sknk_ampks)) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_SKNK", aname, get_pcvar_num(cvar_sknk_ampks), vname) } // Just a normal kill else { // Option disabled if (!get_pcvar_num(cvar_skn_ampks)) return;
// Award him zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_skn_ampks)) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_SKN", aname, get_pcvar_num(cvar_skn_ampks), vname) } } // Human makes the kill else { // But he won't be so happy if (!zp_is_nemesis_round() && get_pcvar_num(cvar_hkn_round)) return;
// He knifed the Nemesis if (get_user_weapon(attacker) == CSW_KNIFE && get_pdata_int(victim, m_bitsDamageType) == (DMG_BULLET | DMG_NEVERGIB)) { // Option disabled if (!get_pcvar_num(cvar_hknk_ampks)) return;
// Award him zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hknk_ampks)) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKNK", aname, get_pcvar_num(cvar_hknk_ampks), vname) } // Just a normal kill else { // Option disabled if (!get_pcvar_num(cvar_hkn_ampks)) return;
// Award him zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hkn_ampks)) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKN", aname, get_pcvar_num(cvar_hkn_ampks), vname) } } } // Well this time it was just a Zombie else { // Survivor strikes again if (zp_get_user_survivor(attacker)) { // He knifed the Zombie if (get_user_weapon(attacker) == CSW_KNIFE && get_pdata_int(victim, m_bitsDamageType) == (DMG_BULLET | DMG_NEVERGIB)) { // Option disabled if (!get_pcvar_num(cvar_skzk_ampks)) return;
// Award him zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_skzk_ampks)) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_SKZK", aname, get_pcvar_num(cvar_skzk_ampks), vname) } } // Human wants some ammo packs else { // He knifed the Zombie if (get_user_weapon(attacker) == CSW_KNIFE && get_pdata_int(victim, m_bitsDamageType) == (DMG_BULLET | DMG_NEVERGIB)) { // Victim was the first Zombie if (zp_get_user_first_zombie(victim)) { // No rewards for this kind of kill if (!get_pcvar_num(cvar_hkfzk_ampks)) return;
// Award the killer zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hkfzk_ampks)) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKFZK", aname, get_pcvar_num(cvar_hkfzk_ampks), vname) } // Last Zombie else if (zp_get_user_last_zombie(victim)) { // No rewards for this kind of kill if (!get_pcvar_num(cvar_hklzk_ampks)) return;
// Award the killer zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hklzk_ampks)) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKLZK", aname, get_pcvar_num(cvar_hklzk_ampks), vname) } // Just one of those Zombies else { // Option disabled if (!get_pcvar_num(cvar_hkzk_ampks)) return;
// Award him zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hkzk_ampks)) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKZK", aname, get_pcvar_num(cvar_hkzk_ampks), vname) } } } } } // Survivor or Human else { // Killed player was Survivor if (zp_get_user_survivor(victim)) { // Nemesis is the killer if (zp_get_user_nemesis(attacker)) { // And? if (!get_pcvar_num(cvar_nks_ampks) || !zp_is_plague_round() && get_pcvar_num(cvar_nks_round)) return;
// And he deserves a treat zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_nks_ampks)) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_NKS", aname, get_pcvar_num(cvar_nks_ampks), vname) } // Killer is a Zombie else { // So what? if (!get_pcvar_num(cvar_zks_ampks) || !zp_is_survivor_round() && get_pcvar_num(cvar_zks_round)) return;
// So let's give him something... Paulie want a cracker? zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_zks_ampks)) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_ZKS", aname, get_pcvar_num(cvar_zks_ampks), vname) } } // Just a random Human else { // Showing this isn't allowed if (!get_pcvar_num(cvar_nzkih_show) || !cvar_nzkih_ampks) return;
// Nemesis' frag if (zp_get_user_nemesis(attacker)) zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_NKH", aname, cvar_nzkih_ampks, vname) // Zombies are good at killing too else zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_ZKH", aname, cvar_nzkih_ampks, vname) } } } }
// ZP User Infected Forward public zp_user_infected_post(id, infector, nemesis) { // Plugin is disabled | Option disabled | No ammo packs to receive | Not infected by a player | Turned into Nemesis if (!get_pcvar_num(cvar_toggle) || !get_pcvar_num(cvar_nzkih_show) || !cvar_nzkih_ampks || !infector || nemesis) return;
// Get infector and infected's name static aname[32], vname[32] get_user_name(infector, aname, 31) get_user_name(id, vname, 31)
// Spread the word zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_ZIH", aname, cvar_nzkih_ampks, vname) }
// Colored chat print. Thanks to MeRcyLeZZ zp_colored_print(target, const message[], any:...) { static buffer[512], i, argscount argscount = numargs()
// Send to everyone if (!target) { static player for (player = 1; player <= g_maxplayers; player++) { // Not connected if (!is_user_connected(player)) continue;
// Replace LANG_PLAYER with player id for (i = 2; i < argscount; i++) { if (getarg(i) == LANG_PLAYER) { setarg(i, 0, player) changed[changedcount] = i changedcount++ } }
// Format message for player vformat(buffer, charsmax(buffer), message, 3)
// Send it message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player) write_byte(player) write_string(buffer) message_end()
// Replace back player id's with LANG_PLAYER for (i = 0; i < changedcount; i++) setarg(changed[i], 0, LANG_PLAYER) } } // Send to specific target else { // Not connected if (!is_user_connected(target)) return;
// Format message for player vformat(buffer, charsmax(buffer), message, 3)
Plugin doesn't work but i spend two hours and a lot of think about swarm mode, propably i don't want this. Zombies get a lot of ammo packs and mode is going to super farm.
Srry for problem but you can still help me and last request its much useful
I would like to remove below two things, maybe did you ask why i'll want do that? Because if will appear Plague Mode only Survivor can get ammo packs or Nemesis if killing one of them, i want to increase chance to earn ammo packs for everyone
// Survivor's frag if (zp_get_user_survivor(attacker))
// Nemesis is the killer if (!zp_get_user_nemesis(attacker))
I had a problem with close bracing so i will to ask for help you guys.
That's all and sorry for the problems. Have a nice evening !
Problem it is with Plague Mode. If you playing for example usually human and you did to killed nemesis get 0 ammo packs because one survivor can get ammo packs for kill nemesis, and conversely works the same, if your playing zombie you get nothing because only nemesis could killing survivor.
Returing to Swarm Mode i tell you what's wrong and your edition, problem was on normal infection zombies and humans gain ammo pack, else i saw when zombies get not 2 AP but 4 AP it was so because works my setup zombie plague 4.3, so i refuse that idea thought mode going to good farm to ammo packs
I know my english is so horrible, I have got a problems to write correctly sentence's but still keep working on and soon maybe goes to change
Nope coz i won't gives the same reward in plague and nemesis mode Well you think right and its possible to setup, but i can't giving the same value of ammo packs to both mode