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

BAH! :( Help please


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 12-31-2004 , 21:07  
#21

count?
Freecode is offline
imported_BRUm
Member
Join Date: Dec 2004
Location: Yorkshire - England
Old 12-31-2004 , 21:10  
#22

Right, i pasted it into word, goto line 119 and found this block:

//----------------------------------------------------------------------------------------------
public jesus_maxhealth()
{
new id[6]
new health[9]

read_argv(1,id,5)
read_argv(2,health,

gPlayerMaxHealth[str_to_num(id)] = str_to_num(health)
}
//----------------------------------------------------------------------------------------------

Any probs?
__________________
~Fathers 4 Justice~

Clan server: esoftware.0ffice.info:27015
Clan website: www.esoftware.ukmodz.co.uk
imported_BRUm is offline
Send a message via MSN to imported_BRUm
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 12-31-2004 , 21:17  
#23

post your whole source code
Freecode is offline
imported_BRUm
Member
Join Date: Dec 2004
Location: Yorkshire - England
Old 12-31-2004 , 21:18   ok
#24

Code:
// jesus! /* CVARS - copy and paste to shconfig.cfg //jesus jesus_level 0 jesus_healpoints 5      //The # of HP healed per second jesus_knifespeed 290            //Speed of jesuseine in knife mode jesus_knifemult 1.35            //Multiplier for knife damage jesus_maxhealth 500 jesus_health 500 */ // v1.17 - JTP - fixed runtime error on damage event if user is already dead // v1.17.5 - JTP - Added code to allow you to regen to your max heatlh #include <amxmod> #include <superheromod> // GLOBAL VARIABLES new gHeroName[]="jesus" new bool:ghasjesusPowers[SH_MAXSLOTS+1] new gPlayerMaxHealth[SH_MAXSLOTS+1] new gHealPoints //---------------------------------------------------------------------------------------------- public plugin_init() {     // Plugin Info     register_plugin("SUPERHERO jesus","1.17.5","{HOJ}Batman/JTP10181")     // DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG     register_cvar("jesus_level", "0" )     register_cvar("jesus_healpoints", "5" )     register_cvar("jesus_knifespeed", "290")     register_cvar("jesus_knifemult", "1.35" )     register_cvar("jesus_health", "500" )     // FIRE THE EVENT TO CREATE THIS SUPERHERO!     shCreateHero(gHeroName, "Auto Heal + SuperKnife", "Auto-Heal,  Knife Damage, Extra Knife Speed", false, "jesus_level" )     // REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS)     register_srvcmd("jesus_init", "jesus_init")     shRegHeroInit(gHeroName, "jesus_init")     // HEAL LOOP     set_task(1.0,"jesus_loop",0,"",0,"b" )     // EXTRA KNIFE DAMAGE     register_event("Damage", "jesus_damage", "b", "2!0")     // Let Server know about Woverines max knife speed     shSetMaxSpeed(gHeroName, "jesus_knifespeed", "[29]" )     //Makes superhero tell jesus a players max health     register_srvcmd("jesus_maxhealth", "jesus_maxhealth")     shRegMaxHealth(gHeroName, "jesus_maxhealth" )     gHealPoints = get_cvar_num("jesus_healpoints") } //---------------------------------------------------------------------------------------------- public jesus_init() {     // First Argument is an id     new temp[6]     read_argv(1,temp,5)     new id=str_to_num(temp)     // 2nd Argument is 0 or 1 depending on whether the id has jesuserine skills     read_argv(2,temp,5)     new hasPowers = str_to_num(temp)     gPlayerMaxHealth[id] = 100     ghasjesusPowers[id] = (hasPowers!=0)     // Got to slow down a jesuserine that lost his powers...     if ( !ghasjesusPowers[id]  && is_user_connected(id) ) {         shRemSpeedPower(id)     } } //---------------------------------------------------------------------------------------------- public jesus_loop() {     if (!shModActive()) return     for ( new id = 1; id <= SH_MAXSLOTS; id++ ) {         if (  ghasjesusPowers[id] && is_user_alive(id)  )   {             // Let the server add the hps back since the # of max hps is controlled by it             // I.E. Superman has more than 100 hps etc.             shAddHPs(id, gHealPoints, gPlayerMaxHealth[id] )         }     } } //---------------------------------------------------------------------------------------------- public jesus_damage(id) {     if (!shModActive() || !is_user_alive(id)) return PLUGIN_CONTINUE     new damage = read_data(2)     new weapon, bodypart, attacker = get_user_attacker(id, weapon, bodypart)     new headshot = bodypart == 1 ? 1 : 0     if ( attacker <= 0 || attacker > SH_MAXSLOTS ) return PLUGIN_CONTINUE     if ( ghasjesusPowers[attacker] && weapon == CSW_KNIFE && is_user_alive(id) ) {         // do extra damage         new extraDamage = floatround(damage * get_cvar_float("jesus_knifemult") - damage)         if (extraDamage > 0) shExtraDamage( id, attacker, extraDamage, "knife", headshot )     }     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public jesus_maxhealth() {     new id[6]     new health[9]     read_argv(1,id,5)     read_argv(2,health,8)     gPlayerMaxHealth[str_to_num(id)] = str_to_num(health) } //----------------------------------------------------------------------------------------------

Der ya go rip of wolverine only way beginners gonna learn right
__________________
~Fathers 4 Justice~

Clan server: esoftware.0ffice.info:27015
Clan website: www.esoftware.ukmodz.co.uk
imported_BRUm is offline
Send a message via MSN to imported_BRUm
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 12-31-2004 , 21:25  
#25

u dont need that whole function
Code:
public jesus_maxhealth() {     new id[6]     new health[9]     read_argv(1,id,5)     read_argv(2,health,8)     gPlayerMaxHealth[str_to_num(id)] = str_to_num(health) }
Freecode is offline
imported_BRUm
Member
Join Date: Dec 2004
Location: Yorkshire - England
Old 12-31-2004 , 21:26   ok
#26

So i cut that bit out, and then everything i wished for should work?

regen hp at 5hp/sec at 500hp max?
__________________
~Fathers 4 Justice~

Clan server: esoftware.0ffice.info:27015
Clan website: www.esoftware.ukmodz.co.uk
imported_BRUm is offline
Send a message via MSN to imported_BRUm
imported_BRUm
Member
Join Date: Dec 2004
Location: Yorkshire - England
Old 12-31-2004 , 21:29   oh..
#27

oh wait... I get this error now


[AMX] Function is not present (function "jesus_maxhealth") (plugin "sh_Jesus.amx")
[AMX] Error raised (module "AMX") (function "register_srvcmd")
[AMX] Run time error 10 on line 108 (plugin "sh_Jesus.amx")

???
__________________
~Fathers 4 Justice~

Clan server: esoftware.0ffice.info:27015
Clan website: www.esoftware.ukmodz.co.uk
imported_BRUm is offline
Send a message via MSN to imported_BRUm
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 12-31-2004 , 21:32  
#28

register_srvcmd("jesus_maxhealth", "jesus_maxhealth") << remove that line???
Freecode is offline
imported_BRUm
Member
Join Date: Dec 2004
Location: Yorkshire - England
Old 12-31-2004 , 21:37   :D
#29

heh, nice one mate the error has gone,

Im just testing it..

__________________
~Fathers 4 Justice~

Clan server: esoftware.0ffice.info:27015
Clan website: www.esoftware.ukmodz.co.uk
imported_BRUm is offline
Send a message via MSN to imported_BRUm
imported_BRUm
Member
Join Date: Dec 2004
Location: Yorkshire - England
Old 12-31-2004 , 21:40   ok
#30

Right everything is fine as far as working is concerned. the health regens at 5hp but stops at 100

how i set jesus to 500hp by default, and making the regen stop at 500 not 100?

__________________
~Fathers 4 Justice~

Clan server: esoftware.0ffice.info:27015
Clan website: www.esoftware.ukmodz.co.uk
imported_BRUm is offline
Send a message via MSN to imported_BRUm
Closed Thread



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 16:26.


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