Raised This Month: $51 Target: $400
 12% 

Subplugin Submission ZP: Regeneration


Post New Thread Reply   
 
Thread Tools Display Modes
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-21-2008 , 08:32   Re: ZP: Regeneration
Reply With Quote #11

Removed Survivor thing. It looks like Survivor is a human, lol.
Quote:
Originally Posted by Hammerfallerz View Post
Excuse me, hleV, can you make this plugin like a passive zombie skill? I mean so it will always (no need to being hit) regenerate zombie health for X hp every second with no timelimit (besides last zombie, nemesis & survivor)? And, of course, zombie's HP can't go over it classes max hp
Try this:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
 
new g_Statusg_Timeg_Amountg_ZombiePlagueg_Nemesisg_FirstZombieg_LastZombieg_MaxPlayers;
 
public 
plugin_init()
{
        
register_plugin("ZP: Regeneration""1.2 (Special)""hleV");
 
        
g_Status register_cvar("zp_regeneration""1");
        
g_Time register_cvar("zp_regen_time""1");
        
g_Amount register_cvar("zp_regen_amount""10");
        
g_Nemesis register_cvar("zp_regen_nemesis""1");
        
g_FirstZombie register_cvar("zp_regen_firstzombie""1");
        
g_LastZombie register_cvar("zp_regen_lastzombie""1");
 
        
set_task(get_pcvar_float(g_Time), "Regenerate"___"b");
 
        
g_ZombiePlague get_cvar_pointer("zp_on");
        
g_MaxPlayers get_maxplayers();
}
 
public 
Regenerate()
{
        if (!
get_pcvar_num(g_Status) || !g_ZombiePlague || !get_pcvar_num(g_Status))
                return;
 
        for (new 
Client 1Client <= g_MaxPlayersClient++)
        {
                new 
Health get_user_health(Client);
 
                if (!
is_user_connected(Client) || !is_user_alive(Client) || !zp_get_user_zombie(Client))
                        return;
 
                if (!
get_pcvar_num(g_Nemesis) && zp_get_user_nemesis(Client))
                        return;
 
                if (!
get_pcvar_num(g_FirstZombie) && zp_get_user_first_zombie(Client))
                        return;
 
                if (!
get_pcvar_num(g_LastZombie) && zp_get_user_last_zombie(Client))
                        return;
 
                new 
NeededHealth zp_get_zombie_maxhealth(Client) - Health;
 
                if (
NeededHealth <= get_pcvar_num(g_Amount))
                {
                        
set_pev(Clientpev_healthHealth float(NeededHealth));
                        return;
                }
 
                
set_pev(Clientpev_healthHealth get_pcvar_float(g_Amount));
        }

Also, check the new update.
__________________

Last edited by hleV; 10-21-2008 at 08:39.
hleV is offline
Old 10-21-2008, 13:06
MEN
This message has been deleted by MEN. Reason: прошу прощения на мо
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 10-21-2008 , 13:39   Re: ZP: Regeneration
Reply With Quote #12

why You ask it here? this has nothing to do with Regeneration...
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
MEN
Junior Member
Join Date: Nov 2007
Old 10-21-2008 , 14:36   Re: ZP: Regeneration
Reply With Quote #13

I am sorry at the moment of creation of a theme had no possibility to make the correct decision. I will be corrected!
MEN is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 10-21-2008 , 14:45   Re: ZP: Regeneration
Reply With Quote #14

You just could add it as request and someone probably would do this actually I was looking at it but deleted it...
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
Hammerfallerz
Senior Member
Join Date: Feb 2008
Old 10-22-2008 , 01:55   Re: ZP: Regeneration
Reply With Quote #15

Any cvar for automatic turning off regeneration for zombies when there's a survivor round? Makes kinda impossible for survivor to kill them all.
Hammerfallerz is offline
Mlk27
Veteran Member
Join Date: May 2008
Old 10-23-2008 , 09:24   Re: ZP: Regeneration
Reply With Quote #16

edit: nevermind

what's #define TASK_REGENERATION 1024 for?

Last edited by Mlk27; 10-23-2008 at 09:28.
Mlk27 is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-23-2008 , 14:15   Re: ZP: Regeneration
Reply With Quote #17

Quote:
Originally Posted by Mlk27 View Post
edit: nevermind

what's #define TASK_REGENERATION 1024 for?
I'm giving task a number so I could remove this task without messing the other tasks that contains Client info.
BTW I realized that it's not needed because there are no other tasks in plugin.

Updated to 1.2 Final.
__________________
hleV is offline
Mlk27
Veteran Member
Join Date: May 2008
Old 10-23-2008 , 18:18   Re: ZP: Regeneration
Reply With Quote #18

eh..just checked the plugin..i see you have g_FirstZombie and g_LastZombie but their cvars aren't registered
Mlk27 is offline
spirt90
Junior Member
Join Date: Oct 2008
Old 10-24-2008 , 13:02   Re: ZP: Regeneration
Reply With Quote #19

Code:
 
L 10/24/2008 - 17:19:17: Invalid CVAR pointer
L 10/24/2008 - 17:19:17: [AMXX] Displaying debug trace (plugin "zp_regeneration.amxx")
L 10/24/2008 - 17:19:17: [AMXX] Run time error 10: native error (native "get_pcvar_num")
L 10/24/2008 - 17:19:17: [AMXX]    [0] zp_regeneration.sma::SetRegeneration (line 29)
i got this error can some one tell me why and how to fix it
spirt90 is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-24-2008 , 14:14   Re: ZP: Regeneration
Reply With Quote #20

Quote:
Originally Posted by spirt90 View Post
Code:
 
L 10/24/2008 - 17:19:17: Invalid CVAR pointer
L 10/24/2008 - 17:19:17: [AMXX] Displaying debug trace (plugin "zp_regeneration.amxx")
L 10/24/2008 - 17:19:17: [AMXX] Run time error 10: native error (native "get_pcvar_num")
L 10/24/2008 - 17:19:17: [AMXX]    [0] zp_regeneration.sma::SetRegeneration (line 29)
i got this error can some one tell me why and how to fix it
Does this happen with the latest version (1.2 Final)? I've checked that line and can't really see the problem. Can't see one in all plugin.
__________________
hleV is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode