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

Change Hostage HP


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-27-2009 , 18:36   Re: Change Hostage HP
Reply With Quote #41

Can i just ask why you use event RoundTime rather than logevent Round_Start ?

http://forums.alliedmods.net/showthread.php?t=42159 (i'm sure you have already read that, i'm even wondering when you have finished to read all forums)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 03-27-2009 , 18:39   Re: Change Hostage HP
Reply With Quote #42

Quote:
Originally Posted by ConnorMcLeod View Post
Can i just ask why you use event RoundTime rather than logevent Round_Start ?

http://forums.alliedmods.net/showthread.php?t=42159 (i'm sure you have already read that, i'm even wondering when you have finished to read all forums)
Me? I just arranged the code (from the main post) to put the word HOSTAGE in the middle. I didn't even knew that RoundTime existed.


Quote:
i'm even wondering when you have finished to read all forums
You are poking fun at me

Ok, in fact i knew RoundTime, but only by its name. I never used it. And yes, i already read that page long ago.

BTW:

Quote:
Originally Posted by VEN View Post
Also i was amazed at how many mistakes was made even by the "expirienced" coders in try to detect the "New Round"! The most common mistake was: PHP Code:
register_event("ResetHUD", "newRound", "b")

which is completely incorrect. The "ResetHUD" is a specified event which is called under many circumstances for every player. So sometimes you can get more than even one hundred such "newRound" function calls per a single round!
Quote:
Originally Posted by Freecode View Post
i would disagree. Most of the experienced coders know this. We just choose that name which might make you think that its a new round. Just recently i started naming it something more proper (new_spawn( id ) )
__________________

Last edited by joaquimandrade; 03-27-2009 at 19:00.
joaquimandrade is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 03-27-2009 , 19:18   Re: Change Hostage HP
Reply With Quote #43

Connor, ultra leet version for you:


PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>

#define ARKSHINE_ENTITY "hostage_entity"
#define CONNOR_ENTITY "monster_scientist"
#define LOOK_A_CLASS find_ent_by_class
#define A_NUMBER -1
#define I_WANT_A_CVAR get_cvar_float("mp_hostagehp")
#define TTTTTT new iHos = LOOK_A_CLASS(A_NUMBER, ARKSHINE_ENTITY);
#define AA while(iHos != 0){entity_set_float(iHos, EV_FL_health, I_WANT_A_CVAR);iHos = LOOK_A_CLASS(iHos, ARKSHINE_ENTITY);}
#define HHHHHH new jHos = LOOK_A_CLASS(A_NUMBER, CONNOR_ENTITY);
#define AAAA while(jHos != 0){entity_set_float(jHos, EV_FL_health, I_WANT_A_CVAR);iHos = LOOK_A_CLASS(jHos,CONNOR_ENTITY);}
#define HH health=health+0;
#define O HH
#define OOO HH
#define S HH 
#define SSS HH 
#define SSSS HH 
#define A HH
#define G HH 
#define GG HH 
#define GGG HH 
#define E HH
#define EEE HH
#define EEEE HH
#define TT HH


public SetHostageHp(id)
{
    new 
health get_cvar_num("mp_hostagehp")
    
    if(
health != 100)
    {
        if(!(
health <= 9999))
            
set_cvar_num("mp_hostagehp",100)
    
        
HH  HH  OOO   SSS  TTTTTT  AA   GGG  EEEE 
        HH  HH O   O S       TT   A  A G     E    
        HHHHHH O   O  SSS    TT   AAAA G  GG EEE  
        HH  HH O   O     S   TT   A  A G   G E    
        HH  HH  OOO  SSSS    TT   A  A  GGG  EEEE
    
}
        
    return 
PLUGIN_CONTINUE
}

public 
plugin_init()
{
    
register_plugin("Hostage HP""1.1""AssKicR")
    
register_cvar("mp_hostagehp","100"//Max is 9999
    
register_logevent("SetHostageHp"2"1=Round_Start")

Attached Files
File Type: sma Get Plugin or Get Source (leetHostageHP.sma - 755 views - 1.5 KB)
__________________

Last edited by joaquimandrade; 03-27-2009 at 19:20.
joaquimandrade is offline
bomnacama
Senior Member
Join Date: Dec 2008
Location: Portugal
Old 03-27-2009 , 20:55   Re: Change Hostage HP
Reply With Quote #44

Quote:
Originally Posted by joaquimandrade View Post
Connor, ultra leet version for you:


PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>

#define ARKSHINE_ENTITY "hostage_entity"
#define CONNOR_ENTITY "monster_scientist"
#define LOOK_A_CLASS find_ent_by_class
#define A_NUMBER -1
#define I_WANT_A_CVAR get_cvar_float("mp_hostagehp")
#define TTTTTT new iHos = LOOK_A_CLASS(A_NUMBER, ARKSHINE_ENTITY);
#define AA while(iHos != 0){entity_set_float(iHos, EV_FL_health, I_WANT_A_CVAR);iHos = LOOK_A_CLASS(iHos, ARKSHINE_ENTITY);}
#define HHHHHH new jHos = LOOK_A_CLASS(A_NUMBER, CONNOR_ENTITY);
#define AAAA while(jHos != 0){entity_set_float(jHos, EV_FL_health, I_WANT_A_CVAR);iHos = LOOK_A_CLASS(jHos,CONNOR_ENTITY);}
#define HH health=health+0;
#define O HH
#define OOO HH
#define S HH 
#define SSS HH 
#define SSSS HH 
#define A HH
#define G HH 
#define GG HH 
#define GGG HH 
#define E HH
#define EEE HH
#define EEEE HH
#define TT HH


public SetHostageHp(id)
{
    new 
health get_cvar_num("mp_hostagehp")
    
    if(
health != 100)
    {
        if(!(
health <= 9999))
            
set_cvar_num("mp_hostagehp",100)
    
        
HH  HH  OOO   SSS  TTTTTT  AA   GGG  EEEE 
        HH  HH O   O S       TT   A  A G     E    
        HHHHHH O   O  SSS    TT   AAAA G  GG EEE  
        HH  HH O   O     S   TT   A  A G   G E    
        HH  HH  OOO  SSSS    TT   A  A  GGG  EEEE
    
}
        
    return 
PLUGIN_CONTINUE
}

public 
plugin_init()
{
    
register_plugin("Hostage HP""1.1""AssKicR")
    
register_cvar("mp_hostagehp","100"//Max is 9999
    
register_logevent("SetHostageHp"2"1=Round_Start")

will this work?
__________________



Please FEED MY HAMSTERS by giving me +karma
bomnacama is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 03-27-2009 , 20:56   Re: Change Hostage HP
Reply With Quote #45

Quote:
Originally Posted by bomnacama View Post
will this work?
yes
__________________
joaquimandrade is offline
no name
Junior Member
Join Date: Oct 2009
Old 10-21-2009 , 08:02   Re: Change Hostage HP
Reply With Quote #46

Anybody have plugin for change start hp for counter terrorist team to 25?
no name is offline
crashbandicoot
BANNED
Join Date: Mar 2012
Location: why will u come XD?
Old 10-07-2015 , 21:53   Re: Change Hostage HP
Reply With Quote #47

In hostage_hp.sma " monster_scientist" what is it ? a class_name ? WTF ? I did not find it from anywhere in hl1mod . Can you explain it ? Please ! Who can explain ?
crashbandicoot is offline
Send a message via Skype™ to crashbandicoot
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 10:30.


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