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

does nothing hero!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
timian
Member
Join Date: Oct 2006
Location: Denmark
Old 04-16-2009 , 12:06   does nothing hero!
Reply With Quote #1

this hero is just to learn some diffrent things about sh coding. and joaking my friends.

hp = 10.000 (100*normal hp)
damage take = (100*dmgTake-dmgTake)

but i got a lot of erros and can't fix them my self!


Code:
//Health mania get 10000 hp

/* CVARS - copy and past to shconfig.cfg
HM_level 0
HM_health 10000
HM_dmgTake dmg*100

*/

#include <amxmodx>
#include <superheromod>

new gHeroName[]="Health Mania"
new bool:gHasHmPower[SH_MAXSLOTS+1]
//---------------------------------------------------------------------------------------------------
public plugin_init()
{
    //plugin info
    register_plugin("SUPERHERO Health Mania", "0,1", "Beancake12")
    
    //DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
    register_cvar("hm_level", "0")
    register_cvar("hm_health", "player_health"*100)
    register_cvar("hm_extra", "100")
    
    //event to create this hero
    shCreateHero(gHeroName, "muuuuch HP!", "this hero give you 10.000HP! and a little bad secret!")
    
    //event hm respond to
    register_event("damage", "hm_damage", "b", "2!0")
    
    //init
    register_srvcmd("hm_init", "hm_init")
    shRegHeroInit(gHeroName, "hm_init")
    
    //tell server Health Manias true powers!
    shSetMaxHealth(gHeroName, "hm_health")
}
//---------------------------------------------------------------------------------------------------
public hm_init()
{
    //id argument
    new temp[6]
    read_argv(1, temp, 5)
    new is=str_to_num(temp)
    
    //the 2nd argument i dont understand!
    read_argv(2, temp, 5)
    new hasPowers = str_to_num(temp)
    gHasHmPower[id] = hasPowers != 0
    if (!hasPowers && gHasHmPower && is_user_alive(id) && shModActive())
    {
        shRemHealtPower(id)
        HmTakeDamage(id)
    }
}
//---------------------------------------------------------------------------------------------------
public HmtakeDamage(id)
if(gHasHmPower[id] && is_user_alive(id) && shModActive() && damage > 0)
{
    new extraDamage = floatround(damage*get_cvar_float("hm_extra")-damage
}
timian is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 04-16-2009 , 17:44   Re: does nothing hero!
Reply With Quote #2

your version of superhero mod ??
Fr33m@n is offline
timian
Member
Join Date: Oct 2006
Location: Denmark
Old 04-17-2009 , 07:05   Re: does nothing hero!
Reply With Quote #3

amxx 1.8... dont remember xD
timian is offline
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 04-17-2009 , 14:45   Re: does nothing hero!
Reply With Quote #4

Quote:
Originally Posted by Fr33m@n View Post
your version of superhero mod ??
shmod 1.2 has backward compat. your question is fail.
__________________

Last edited by yang; 04-17-2009 at 14:57.
yang is offline
Send a message via AIM to yang
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 04-17-2009 , 15:06   Re: does nothing hero!
Reply With Quote #5

I know that, i use 90 hero on my serv and all are not sh 1.2 compliant. it's not in this way i post this question... i just wanna know if i cand send to him an hero sh 1.2 compliant

Last edited by Fr33m@n; 04-17-2009 at 15:10.
Fr33m@n is offline
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 04-17-2009 , 23:54   Re: does nothing hero!
Reply With Quote #6

Quote:
Originally Posted by Fr33m@n View Post
... on my serv and all are not sh 1.2 compliant....
Didn't we just establish shmod 1.2 has backward compat? o.O
__________________
yang is offline
Send a message via AIM to yang
timian
Member
Join Date: Oct 2006
Location: Denmark
Old 04-18-2009 , 12:40   Re: does nothing hero!
Reply With Quote #7

please drop that OT and help me xD
timian is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 04-19-2009 , 09:00   Re: does nothing hero!
Reply With Quote #8

Quote:
... on my serv and all are not sh 1.2 compliant....
you don't understand the meaning of this sentence.

sorry for my bad english. i just wanna say sh 1.18 with 1.2 heroes. if i want to send to him an 1.2 heroes and he have sh 1.18. he will have some problems... thay why i wanna know his version of superhero mod...

furthermore the official website (not the forum) have a link to sh 1.18 version not to sh 1.2.

That why i ask this question.

Last edited by Fr33m@n; 04-19-2009 at 09:11.
Fr33m@n 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 22:37.


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