What do these codes do?
The codes i will show in this thread are codes meant to be used as mods in the source code of ZP, not to be compiled as separated plugins.
The codes are supposed to add a function that will make the radius around the center of the explosion of the infection grenade to be infective for X seconds, infecting humans who go inside this radius. Is this what the codes actually do, or are the codes just generalized codes that aren't specialized and are dysfunctional (not working)? Here are the two codes: Code:
new const Float:INFECTION_RADIUS = 200.0; // Adjust the radius as neededCode:
new const Float:INFECTION_RADIUS = 200.0; // Adjust the radius as needed |
Re: What do these codes do?
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:
Code:
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:
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 |
Re: What do these codes do?
Quote:
Ok, it seems that ChatGPT can't make working plugin, so i will try to do it by myself... |
Re: What do these codes do?
ChatGPT is not to be trusted and don't try to use it as a crutch, it will likely make things worse for you learning anything correctly.
|
| All times are GMT -4. The time now is 10:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.