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

Superhero Generator


Post New Thread Reply   
 
Thread Tools Display Modes
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 05-04-2010 , 16:36   Re: Superhero Generator
Reply With Quote #81

You talked about made a rip. I at suck at PHP HTML or thing like that.

Last edited by Fr33m@n; 05-05-2010 at 05:32.
Fr33m@n is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 05-04-2010 , 19:02   Re: Superhero Generator
Reply With Quote #82

I think PHP is easy to learn to understand. There are just a few minor things in the new one I do not understand, and this keeps me from finishing it, or actually make the HP, AP and stuff work. After that is working, I think adding laser and stuff would be easy, but as it is for now, I cannot finish it. Once a friend who knows allot more php than I do comes over, I will make him take a look at it, so I can at least get the basic stuff done.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Souper Man
Junior Member
Join Date: Jul 2010
Old 08-13-2010 , 20:56   Re: Superhero Generator
Reply With Quote #83

How do we make heros with beams and all that?
Souper Man is offline
Souper Man
Junior Member
Join Date: Jul 2010
Old 08-13-2010 , 20:58   Re: Superhero Generator
Reply With Quote #84

I got a problem, once i make a hero that has a custom gun after you die the next round you dont have it anymore
Souper Man is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 08-13-2010 , 21:24   Re: Superhero Generator
Reply With Quote #85

Because it is outdated. Use my tutorial and put together a hero yourself. Then you will make it in updated ways.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
lp_marto
Junior Member
Join Date: Nov 2010
Old 12-07-2010 , 05:32   Re: Superhero Generator
Reply With Quote #86

//kecov! - sadsadsadsad

//This hero was made was using jtpizzalover's superhero generator
/* CVARS - copy and paste to shconfig.cfg

//kecov
kecov_level 12
kecov_health 999 //Default 100 (no extra health)
kecov_armor 999 //Default 150
kecov_gravity 0.24 //Default 1.0 = no extra gravity (0.50 is 50% normal gravity, ect.)
kecov_speed 999 //Default -1 = no extra speed, this cvar is for all weapons (for faster then normal speed set to 261 or higher)
kecov_knifemult 98.2 //Damage multiplyer for his knife
*/

#include <amxmodx>
#include <superheromod>
#include <fakemeta>
new HeroName[] = "kecov"
new bool:HasHero[SH_MAXSLOTS+1]

new CvarknifeDmgMult
public plugin_init()
{
// Plugin Info
register_plugin("SUPERHERO kecov","2.1.2","lp_marto")

// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
register_cvar("kecov_level", "12")
register_cvar("kecov_health", "999")
register_cvar("kecov_armor", "999")
register_cvar("kecov_gravity", "0.24")
register_cvar("kecov_speed", "999")
CvarknifeDmgMult = register_cvar("kecov_knifemult", "98.2")

// FIRE THE EVENT TO CREATE THIS SUPERHERO!
shCreateHero(HeroName, "fly,health,mana,speed,knife at distance", "sadsadsadsad", false, "kecov_level")

// REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS)
// INIT
register_srvcmd("kecov_init", "kecov_init")
shRegHeroInit(HeroName, "kecov_init")

// EVENTS

register_event("CurWeapon", "weapon_change", "be", "1=1")
register_event("Damage", "kecov_damage", "b", "2!0")
// Let Server know about the hero's variables
shSetShieldRestrict(HeroName)
shSetMaxHealth(HeroName, "kecov_health")
shSetMaxArmor(HeroName, "kecov_armor")
shSetMinGravity(HeroName, "kecov_gravity")
shSetMaxSpeed(HeroName, "kecov_speed", "[0]")
}
public plugin_precache()
{
precache_model("models/shmod/kecov_v_knife.mdl")
precache_model("models/shmod/kecov_p_knife.mdl")
}
public kecov_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 the hero
read_argv(2, temp, 5)
new hasPowers = str_to_num(temp)
//This hero was made was using jtpizzalover's superhero generator
// Reset their shield restrict status
// Shield restrict MUST be before weapons are given out
shResetShield(id)

switch(hasPowers)
{
case true:
{
HasHero[id] = true

if ( is_user_alive(id) )
{
kecov_weapons(id)
switch_model(id)
}
}
case false:
{
// Check is needed since this gets run on clearpowers even if user didn't have this hero
if ( is_user_alive(id) && HasHero[id] )
{
// This gets run if they had the power but don't anymore
engclient_cmd(id, "drop", "weapon_knife")

shRemHealthPower(id)
shRemArmorPower(id)
shRemGravityPower(id)
shRemSpeedPower(id)
}
HasHero[id] = false

}
}
}



public kecov_weapons(id)
{
if ( !shModActive() || !is_user_alive(id) || !HasHero[id] )
return

shGiveWeapon(id, "weapon_knife")
}
switch_model(id)
{
if ( !shModActive() || !is_user_alive(id) || !HasHero[id] )
return

new clip, ammo, wpnid = get_user_weapon(id, clip, ammo)

if ( wpnid == CSW_KNIFE )
{
set_pev(id, pev_viewmodel2, "models/shmod/kecov_v_knife.mdl")
set_pev(id, pev_weaponmodel2, "models/shmod/kecov_p_knife.mdl")
}
}
public weapon_change(id)
{
if ( !shModActive() || !HasHero[id] )
return

new wpnid = read_data(2)

if ( wpnid != CSW_KNIFE )
return

switch_model(id)

new clip = read_data(3)

// Never Run Out of Ammo!
if ( clip == 0 )
shReloadAmmo(id)
}
public kecov_damage(id)
{
if ( !shModActive() || !is_user_alive(id) )
return

new weapon, bodypart, attacker = get_user_attacker(id, weapon, bodypart)

if ( attacker <= 0 || attacker > SH_MAXSLOTS )
return

if ( HasHero[attacker] && weapon == CSW_KNIFE && is_user_alive(id) )
{
new damage = read_data(2)
new headshot = bodypart == 1 ? 1 : 0

// do extra damage
new extraDamage = floatround(damage * get_pcvar_float(CvarknifeDmgMult) - damage)
if ( extraDamage > 0 )
shExtraDamage(id, attacker, extraDamage, "knife", headshot)



how to get plugin and scripting ??
lp_marto is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 12-07-2010 , 10:30   Re: Superhero Generator
Reply With Quote #87

Fr33m@n is offline
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 12-07-2010 , 12:02   Re: Superhero Generator
Reply With Quote #88

Oh my gosh... Just GTFO okey? We dont want you here...


Quote:
Originally Posted by Fr33m@n View Post
I totally agree..
__________________
The Art of War is offline
jtpizzalover
Senior Member
Join Date: Dec 2005
Location: Left
Old 01-03-2011 , 21:51   Re: Superhero Generator
Reply With Quote #89

Can someone make sure this version compiles fine? I'm pretty sure I couldn't have messed it up with that little edit but it never hurts.

Speaking of minor edit:
Quote:
-Updated form to (current) website
-Fully posted source code to both (unfinished) 1.2 and 1.18 versions.
-Added mp5 and para to 1.18
-Fixed giving of guns on new round. Awaiting Feedback
I don't see the point of adding the new features to 1.18 version but I do have a couple planned for 1.2.
So far for that I have a separate cvar for unlimited ammo, laser, hook, admin check, nade giving, self respawning, and no clip. More features take more time to add fyi.
__________________
jtpizzalover is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 01-04-2011 , 07:01   Re: Superhero Generator
Reply With Quote #90

I made a new hero with this which has it all. It does not compile.

In line 148 it says

Code:
if (wpnid != CSW_m4a1 && wpnid > 0) {
Should be

Code:
if (wpnid != CSW_M4A1 && wpnid > 0) {
Also, this while forward is indented wrong:

Code:
public newSpawn(id)
{
    if ( HasHero[id] && is_user_alive(id) && shModActive() ) {
        set_task(0.1, "Hello_weapons", id)
        new wpnid = read_data(2)
        
    if (wpnid != CSW_M4A1 && wpnid > 0) {
    new wpn[32]
    get_weaponname(wpnid,wpn,31)
    engclient_cmd(id,wpn)
        }
    }
}
Also:

Code:
public Hello_morph(id)
{
    if ( HeroModelSet[id] || !is_user_alive(id) || !HasHero[id] )
        return

    cs_set_user_model(id, "Hero")

    HeroModelSet[id] = true
}
The name of the hero is "hello" and therefor it makes the path for the playermodel

precache_model("models/player/Hello/Hello.mdl")

So it should be

cs_set_user_model(id, "Hello")

Just the faults I quickt found.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
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 23:51.


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