Zombie Plague: Redux [rewrite version]
Hello,
I am rewriting the original Zombie Plague 5.0.8a from scratch, with some changes in the code, and I am stuck with a problem that I am almost 100% sure I have done everything right, and I just can't seem to find what's wrong with the code that it bugs like that! Latest source code is on both main and development branches: - Main: https://github.com/theycallmeyuzdi/z...edux/tree/main - Development: https://github.com/theycallmeyuzdi/z...ee/development - Resource files: https://downloads.rvrealm.com/game-s...-resources.zip The problem is basically as follows: - When someone becomes the first zombie in an infection game mode, if they were killed, they spawn as zombie the next round although it has been reset - When the first zombie infects other humans, the same problem will occur for them the next round, unless they terminate all humans - When there are two players in the server, the one that is already zombie will stay as zombie, and the other player may turn into a zombie, no one can kill the other and the round won't end, and on the next round the two players will be zombies Maybe a more experienced coder can help out? What's the problem? What did I do wrong? How to fix it? |
Re: Zombie Plague: Redux [rewrite version]
Hi, I would be happy to help but there's 3 problems with your request:
1. You're rewriting an (almost) perfectly fine version of ZP, any reason why you're doing that? 2. There are many sketchy parts in your code, I won't bother pointing them out if you don't give a good reason why you're re-writing ZP in the first place. 3. You should attach your resources (models/sounds/sprites) so we can test the plugin out at least... |
Re: Zombie Plague: Redux [rewrite version]
Rewriting reasons:
1. Better and more extended API 2. Fixing bugs present in the original mode 3. Giving the plugin API and subplugins more customizability 4. Trying to make zombie classes and human classes more customizable by removing or adding necessary stuff to make it less unified and more diverse instead Sketchy parts? Buggy parts? Just point them out, or your messages and replies are no good here! That's the whole reason I am posting a "Scripting Help", also if you don't like my "rewrite" version, then do not use it, simple! Resource files: https://downloads.rvrealm.com/game-s...-resources.zip |
Re: Zombie Plague: Redux [rewrite version]
PHP Code:
I didn't plan to use your version in the first place, I'm just trying to save you some time because I believe ZP 5.0.8a is perfect as it is (99% of the time). I will point out some mistakes you are making throughout your plugins though. Ham spawn should be registered as post PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
I doubt this is all that's wrong in there, you should avoid unnecessary checks and look up how to do things the proper way, or things will be prone to fail. If you don't know where to look, then ZP50 source code is a great place to start. |
Re: Zombie Plague: Redux [rewrite version]
Thank you so very much, pointing out my mistakes taught me better coding and fixed the bug!
Updated the code on GitHub! |
| All times are GMT -4. The time now is 21:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.