PDA

View Full Version : help with making a hero


sik_yoda
03-27-2007, 23:37
so, i was interested in starting custom heroes, but then i got to the point where scripting was pretty hard. i'm currently trying to create one, but i think i still mite need sum help from the more experianced. i want to create a hero called "SICKO" [dedication to my clan ldr] which basically just gives u 1000 hp and 2000 ap, higher speed, lower gravity, and stronger knife. for the knife, i want the model to be a chainsaw. i know i could rip stuff from other heroes, so i have heard, but i don't really know how to do that properly, if i know at all. so i just need sum help in creating this hero for now. thx a lot!!

Emp`
03-28-2007, 00:50
create the hero here: http://forums.alliedmods.net/showthread.php?t=52521

then look at that for refrences.

sik_yoda
03-28-2007, 23:19
i think i got the .sma part down. i'm not sure, but it seems like u need to own ur own server to compile heroes, which i currently don't have. but here's the .sma, and if u would plz, add the regneration power as well. +50 hp per sec

/* CVARS - copy and paste to shconfig.cfg
// SICKO HERO!
SICKO_level 30 //level you get it -default
SICKO_gravity 1.0 //gravity and hieght -default
SICKO_armor 2000 //armor -default
SICKO_health 1000 //health -default
*/
#include <amxmod>
#include <superheromod>
// variables
new gHeroName[]="SICKO"
//----------------------------------------------------------------------------------------------
public plugin_init()
{
// Plugin Info
register_plugin("SUPERHERO SICKO", "1.0", "~SIK~ Yoda")
// edit the shconfig.cfg not this
register_cvar("SICKO_level", "30")
register_cvar("SICKO_gravity", "1.0")
register_cvar("SICKO_armor", "2000")
register_cvar("SICKO_health", "1000")
register_cvar("SICKO_speed", "1500")
// create its events
shCreateHero(gHeroName, "Higher HP/AP, More Speed, And Lower Gravity!!", "For SICKO", false, "SICKO_level")
//register the commands and stuff
// INIT
register_srvcmd("SICKO_init", "SICKO_init")
shRegHeroInit(gHeroName, "SICKO_init")
// give server it variables
shSetMaxHealth(gHeroName, "SICKO_health")
shSetMinGravity(gHeroName, "SICKO_gravity")
shSetMaxArmor(gHeroName, "SICKO_armor")
shSetMaxSpeed(gHeroName, "SICKO_speed", "[0]")
}
//----------------------------------------------------------------------------------------------
public SICKO_init()
{
new temp[6]
read_argv(1,temp,5)
new id = str_to_num(temp)
read_argv(2,temp,5)
new hasPowers = str_to_num(temp)
if ( !hasPowers && is_user_alive(id) )
{
shRemHealthPower (id)
shRemGravityPower (id)
shRemArmorPower (id)
shRemSpeedPower (id)
}
}
//---------------------------------------------------------------------------------------------

sik_yoda
03-28-2007, 23:34
sry noticed sum wrong things

/* CVARS - copy and paste to shconfig.cfg
// SICKO HERO!
SICKO_level 30 //level you get it -default
SICKO_gravity 0.2 //gravity and hieght -default
SICKO_armor 2000 //armor -default
SICKO_health 1000 //health -default
*/
#include <amxmod>
#include <superheromod>
// variables
new gHeroName[]="SICKO"
//----------------------------------------------------------------------------------------------
public plugin_init()
{
// Plugin Info
register_plugin("SUPERHERO SICKO", "1.0", "~SIK~ Yoda")
// edit the shconfig.cfg not this
register_cvar("SICKO_level", "30")
register_cvar("SICKO_gravity", "0.2")
register_cvar("SICKO_armor", "2000")
register_cvar("SICKO_health", "1000")
register_cvar("SICKO_speed", "2500")
// create its events
shCreateHero(gHeroName, "Higher HP/AP, More Speed, And Lower Gravity! Also Health Regeneration!!", "For SICKO", false, "SICKO_level")
//register the commands and stuff
// INIT
register_srvcmd("SICKO_init", "SICKO_init")
shRegHeroInit(gHeroName, "SICKO_init")
// give server it variables
shSetMaxHealth(gHeroName, "SICKO_health")
shSetMinGravity(gHeroName, "SICKO_gravity")
shSetMaxArmor(gHeroName, "SICKO_armor")
shSetMaxSpeed(gHeroName, "SICKO_speed", "[0]")
}
//----------------------------------------------------------------------------------------------
public SICKO_init()
{
new temp[6]
read_argv(1,temp,5)
new id = str_to_num(temp)
read_argv(2,temp,5)
new hasPowers = str_to_num(temp)
if ( !hasPowers && is_user_alive(id) )
{
shRemHealthPower (id)
shRemGravityPower (id)
shRemArmorPower (id)
shRemSpeedPower (id)
}
}
//---------------------------------------------------------------------------------------------

vittu
03-28-2007, 23:50
register_cvar("SICKO_armor", "2000")
register_cvar("SICKO_health", "1000")
register_cvar("SICKO_speed", "2500")Christ, I think I'm quiting I've had enough of this....

sik_yoda
03-29-2007, 19:44
i don't get it... -.- wat's wrong w/ that. i've seen lots of heroes w/ more hp/ap. i'm not sure about the speed, since i don't really know the measurements of the number. 2500 may be too fast, i do not know since this is my first hero. anyways, the hero is at lvl 30, which is the max amount of lvls at the server, so it's ok. but if there was sumthing wrong w/ the coding, plz fix it, which i doubt was the problem.

sik_yoda
03-29-2007, 19:44
can sumone just plz help me...

o...fastest is 999, which i just found out. so plz make the speed 850?

yang
03-30-2007, 01:10
Christ, I think I'm quiting I've had enough of this....

lawl couldn't stop laughing when i saw that hehe