Raised This Month: $ Target: $400
 0% 

During Event Time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 06-10-2009 , 07:40   During Event Time
Reply With Quote #1

I want to add human more health during an event

Code:

PHP Code:
#include <amxmodx>
#include <fun>
#include <zombieplague>
public plugin_init() 
{
 
register_plugin"[ZP] During Event""1.0""Mr.Noobie"
}
public 
zp_round_started(modeid)
{
 if(
mode == MODE_NEMESIS)
 { 
  if(!
is_user_alive(id) || !zp_get_user_nemesis(id))
  {
           
set_user_health(idget_user_health(id) + 750)
  }
 }

but it didn't work.
Mr.Noobie is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 06-10-2009 , 07:46   Re: During Event Time
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <fun>
#include <zombieplague>

new g_maxplayers

public plugin_init() 
{
    
register_plugin"[ZP] During Event""1.0""Mr.Noobie")
    
g_maxplayers get_maxplayers()
}

public 
zp_round_started(gamemodeid)
{
    if(
gamemode == MODE_NEMESIS)
    {
        for(new 
1;id <= g_maxplayers;id++)
        {
            if(!
is_user_alive(id) || !zp_get_user_nemesis(id))
                
set_user_health(idget_user_health(id) + 750)
        }
    }

__________________
alan_el_more is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-10-2009 , 08:53   Re: During Event Time
Reply With Quote #3

IMO on new round noone is zombie.
Code:
#include <amxmodx> #include <fakemeta> #include <zombieplague>   new g_MaxPlrs;   public plugin_init()         g_MaxPlrs = get_maxplayers();   public zp_round_started(GameMode)         if (GameMode == MODE_NEMESIS)                 for (new Cl = 1; Cl <= g_MaxPlrs; Cl++)                         if (is_user_alive(Cl) && !zp_get_user_zombie(Cl))                                 AddHealth(Cl, 750.0);   stock AddHealth(Cl, Float:Health)         set_pev(Cl, pev_health, pev(Cl, pev_health) + Health);
Would be better to use Fun or Engine but all ZP itself uses FM so w/e.
__________________
hleV is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 06-11-2009 , 02:15   Re: During Event Time
Reply With Quote #4

Quote:
Originally Posted by alan_el_more View Post
PHP Code:
#include <amxmodx>
#include <fun>
#include <zombieplague>
 
new g_maxplayers
 
public plugin_init() 
{
    
register_plugin"[ZP] During Event""1.0""Mr.Noobie")
    
g_maxplayers get_maxplayers()
}
 
public 
zp_round_started(gamemodeid)
{
    if(
gamemode == MODE_NEMESIS)
    {
        for(new 
1;id <= g_maxplayers;id++)
        {
            if(!
is_user_alive(id) || !zp_get_user_nemesis(id))
                
set_user_health(idget_user_health(id) + 750)
        }
    }

you made a mistake here:

PHP Code:
new 1;id 
to

PHP Code:
new id 1;id 
it didn't work instead adding hp to Nemesis.
Mr.Noobie 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 13:58.


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