i never made a plugin for zombie plague, i will just give an opinion of what i see
expecting the infection grenade plugin is calling death event on user from a certain area, first plugin it's looking like it's checking if it's killed with the infection grenade (as far as i know, there are some native in zp like zp_user_infected_post/pre and you shouldn't use death event to check if player is infected).
the infection area of the grenade is made around attacker origin, not the origin of the bomb
take a look of how the author is creating the "harmful cloud". he's using attacker origin.
Code:
public event_death
(victim, attacker, weapon
)
{
if (get_user_team(attacker
) == CS_TEAM_ZOMBIE && weapon == ZP_WEAPON_INFECTION_GRENADE
)
{
create_harmful_cloud(get_user_origin(attacker), INFECTION_RADIUS);
infect_nearby_players
(get_user_origin(attacker
), INFECTION_RADIUS
);
}
return PLUGIN_CONTINUE;
}
Code:
native
get_user_origin(index, origin
[3], mode =
0)
/**
* Retrieves an origin related to the client.
*
* @note For a list of possible modes see the Origin_* constants in amxconst.inc.
*
* @param index Client index
* @param origin Array to store origin in
* @param mode What type of origin to retrieve:
* Origin_Client - current position
* Origin_Eyes - position of eyes (and weapon)
* Origin_AimEndClient - aim end position from client position
* Origin_AimEndEyes - aim end position from eyes (hit point for weapon)
* Origin_CS_LastBullet - position of last bullet hit (only for Counter-Strike)
*
* @return 1 on success, 0 if client is not connected
* @error If the client index is not within the range of 1 to
* MaxClients, an error will be thrown.
*/
also, the infection event for players of the area created by this plugin is made only one time, function infect_nearby_players should be in a task of 1s of 0.5s.
after typing the above text, i'm thinking that you want to check the experience of someone in making plugins, is this right?
because the plugin it's not looking like someone with a good experience made it. in death event it's checking if team of the infected player is CS_TEAM_ZOMBIE and in infect_nearby_players it's checking if it's CS_TEAM_TERRORIST, so he's using different constants for same thing and this doesn't make sense (at least for me)
the second plugin is so wrong that i think someone changed the code only to break it, it's infecting players around the zombie that used infection grenade and after 10 second it's "reseting infected players"
Code:
public reset_infected_players() // idk what this should reset, look below
{
for (new i =
1; i <= get_max_players
(); i++
)
{
@@
if (!
is_user_connected(i
) ||
get_user_team(i
) != CS_TEAM_ZOMBIE
) // it's checking if the player is zombie
continue;
set_user_team
(i, CS_TEAM_TERRORIST,
true);
// Reset infected players to human team -> BUT it's setting user team to cs_team_terrorist that (as far as i know) should be zombie team
}
}
so, after this, my opinion is that these codes have been changed by someone who wanted to break the plugin or want to fool someone to buy them trying to make a plugin. it's looking like he know what he's doing, but he's not