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

Hero: Abe


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NOmeR1
Junior Member
Join Date: Mar 2008
Location: [ RU ]
Old 03-28-2008 , 07:41   Hero: Abe
Reply With Quote #1

Abe

Description
Abe can insert his spirit into enemies

[img]http://img206.**************/img206/1153/abedk2.gif[/img]
http://en.wikipedia.org/wiki/Abe_(Oddworld)

shconfig.cfg CVARS
Code:
//Abe
abe_level 10
Required file is a sound from game Abe's Oddysee.
Credits to AssKicR and JTP10181 for lighting effects (from magneto)
Attached Files
File Type: sma Get Plugin or Get Source (sh_abe.sma - 2087 views - 5.3 KB)
File Type: zip sh_abe_required_files.zip (14.4 KB, 960 views)
__________________
My works: Sylar, Abe, Meteorix

Last edited by NOmeR1; 03-28-2008 at 15:21.
NOmeR1 is offline
micke1101
Veteran Member
Join Date: Jan 2008
Location: Banned-town
Old 03-28-2008 , 08:17   Re: Hero: Abe
Reply With Quote #2

can you discribe it littel more?
is it like see through enemys eyes or something?
micke1101 is offline
NOmeR1
Junior Member
Join Date: Mar 2008
Location: [ RU ]
Old 03-28-2008 , 08:41   Re: Hero: Abe
Reply With Quote #3

Sorry for my bad English..
On key down you took over body of your target.
__________________
My works: Sylar, Abe, Meteorix
NOmeR1 is offline
micke1101
Veteran Member
Join Date: Jan 2008
Location: Banned-town
Old 03-28-2008 , 10:50   Re: Hero: Abe
Reply With Quote #4

ok sounds cool i will try it (when someone come in)
micke1101 is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-28-2008 , 23:02   Re: Hero: Abe
Reply With Quote #5

Very nicely done. Good to see a new hero, though I find it a little "cheap" that it instant kills the victim. Nice job though.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
kendra
Senior Member
Join Date: Feb 2011
Location: Chile
Old 07-07-2012 , 04:11   Re: Hero: Abe
Reply With Quote #6

PHP Code:
//Abe! - You can insert your spirit into enemies

/* CVARS - copy and paste to shconfig.cfg

//Abe
abe_level 10

*/

#include <amxmodx>
#include <superheromod>
#include <fakemeta>
#include <cstrike>
#include <fun>

new gHeroName[] = "Abe"
new bool:gHasAbePower[SH_MAXSLOTS+1]
new 
bool:AbePowerUsed[SH_MAXSLOTS+1]
new 
gMorphed[SH_MAXSLOTS+1]
new 
LightSprite

//----------------------------------------------------------------------------------------------
public plugin_init()
{
    
// Plugin Info
    
register_plugin("SUPERHERO Abe""1.0""NOmeR1")

    
// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
    
register_cvar("abe_level""10")

    
// FIRE THE EVENT TO CREATE THIS SUPERHERO!
    
shCreateHero(gHeroName"Insert your spirit into enemies""You can insert your spirit into enemies"true"abe_level")

    
// INIT
    
register_srvcmd("abe_init""abe_init")
    
shRegHeroInit(gHeroName"abe_init")

    
// EVENTS
    
register_event("ResetHUD""newSpawn""b")

    
// KEYDOWN
    
register_srvcmd("abe_kd""abe_kd")
    
shRegKeyDown(gHeroName"abe_kd")

}
//----------------------------------------------------------------------------------------------
public plugin_precache()
{
    
// Precache lighting
    
LightSprite precache_model("sprites/lgtning.spr")

    
// Precache sound
    
precache_sound("shmod/abe_sound.wav")
}
//----------------------------------------------------------------------------------------------
public abe_init()
{

    
// First Argument is an id who has abe
    
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 abe
    
read_argv(2,temp,5)
    new 
hasPowers str_to_num(temp)

    
gHasAbePower[id] = (hasPowers != 0)

}
//----------------------------------------------------------------------------------------------
public abe_kd()
{
    
// First Argument is an id who has abe
    
new temp[6]
    
read_argv(1,temp,5)
    new 
id str_to_num(temp)

    
// Use power once per round
    
if(!AbePowerUsed[id])
    {
        new 
origin[3], modelVictim[32], originVictim[3], weapons[32], wpname[32]
        new 
Float:anglesVictim[3]
        new 
bodyvictimIDweaponsCount

        
// Get target id
        
get_user_aiming(idvictimIDbody)
        if(
get_user_team(id) != get_user_team(victimID) && victimID && victimID <= SH_MAXSLOTS)
        {
            
emit_sound(idCHAN_AUTO"shmod/abe_sound.wav"VOL_NORMATTN_NORM0PITCH_NORM)

            
AbePowerUsed[id] = true

            
// Set victim's model to Abe
            
get_user_info(victimID"model"modelVictim32)
            
morph_model(idmodelVictim)

            
// Get origin from victim and Abe
            
get_user_origin(idorigin0)
            
get_user_origin(victimIDoriginVictim0)

            
// Set origin to victim Abe
            
set_user_origin(idoriginVictim)
            
set_user_origin(victimIDorigin)

            
// Get aiming from victim
            
pev(victimIDpev_anglesanglesVictim)

            
// Set aiming of victim to Abe
            
set_pev(idpev_anglesanglesVictim)
            
set_pev(idpev_fixangle1)

            
// Light effects (credits to AssKicR and JTP10181)
            
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
            
write_byte(8)
            
write_short(id// start entity
            
write_short(victimID// entity
            
write_short(LightSprite// model
            
write_byte(0// starting frame
            
write_byte(15// frame rate
            
write_byte(7// life
            
write_byte(50// line width
            
write_byte(30// noise amplitude
            
write_byte(255// r, g, b
            
write_byte(255// r, g, b
            
write_byte(255// r, g, b
            
write_byte(192// brightness
            
write_byte(0// scroll speed
            
message_end()

            
// Get armor, health, gravity and money from victim
            
new armor get_user_armor(victimID)
            new 
health get_user_health(victimID)
            new 
Float:gravity get_user_gravity(victimID)
            new 
money cs_get_user_money(victimID)

            
// Get victim's weapons
            
get_user_weapons(victimIDweaponsweaponsCount)

            
// Killing victim
            
user_kill(victimID1)

            
// Give armor, health, gravity and money to Abe
            
set_user_armor(idarmor)
            
set_user_health(idhealth)
            
set_user_gravity(idgravity)
            
cs_set_user_money(idmoney0)

            
// Give victim's weapons to Abe
            
for(new wpn 0wpn <= weaponsCountwpn++)
            {
                if(!
user_has_weapon(idweapons[wpn]))
                {
                    
get_weaponname(weapons[wpn], wpname31)
                    
give_item(idwpname)
                }
            }

            
client_print(idprint_chat"[SH](Abe) You have used your Abe power")
        }
        else
        {
            
client_print(idprint_chat"[SH](Abe) You have no target")
        }
    }
    else
    {
        
client_print(idprint_chat"[SH](Abe) You cannot use your Abe power on this round again")
    }

}
//----------------------------------------------------------------------------------------------
public newSpawn(id)
{
    if(
gHasAbePower[id])
    {
        
unmorph_model(id)
        
AbePowerUsed[id] = false
    
}
}
//----------------------------------------------------------------------------------------------
public morph_model(idmodel[])
{
    if(!
gMorphed[id])
    {
        
cs_set_user_model(idmodel)
        
gMorphed[id] = true
    
}
}
//----------------------------------------------------------------------------------------------
public unmorph_model(id)
{
    if(
gMorphed[id])
    {
        
cs_reset_user_model(id)
        
gMorphed[id] = false
    
}
}
//---------------------------------------------------------------------------------------------- 
>>

PHP Code:
//Abe! - You can insert your spirit into enemies

/* CVARS - copy and paste to shconfig.cfg

//Abe
abe_level 10

*/

#include <amxmodx>
#include <superheromod>
#include <fakemeta>
#include <cstrike>
#include <fun>

new gHeroName[] = "Abe"
new bool:gHasAbePower[SH_MAXSLOTS+1]
new 
bool:AbePowerUsed[SH_MAXSLOTS+1]
new 
gMorphed[SH_MAXSLOTS+1]
new 
LightSprite

//----------------------------------------------------------------------------------------------
public plugin_init()
{
    
// Plugin Info
    
register_plugin("SUPERHERO Abe""1.0""NOmeR1")

    
// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
    
register_cvar("abe_level""10")

    
// FIRE THE EVENT TO CREATE THIS SUPERHERO!
    
shCreateHero(gHeroName"Insert your spirit into enemies""You can insert your spirit into enemies"true"abe_level")

    
// INIT
    
register_srvcmd("abe_init""abe_init")
    
shRegHeroInit(gHeroName"abe_init")

    
// EVENTS
    
register_event("ResetHUD""newSpawn""b")

    
// KEYDOWN
    
register_srvcmd("abe_kd""abe_kd")
    
shRegKeyDown(gHeroName"abe_kd")

}
//----------------------------------------------------------------------------------------------
public plugin_precache()
{
    
// Precache lighting
    
LightSprite precache_model("sprites/lgtning.spr")

    
// Precache sound
    
precache_sound("shmod/abe_sound.wav")
}
//----------------------------------------------------------------------------------------------
public abe_init()
{
    
// First Argument is an id who has abe
    
new temp[6]
    
read_argv(1,temp,5)
    new 
id str_to_num(temp)

    if(!
is_user_alive(id))
        return 
PLUGIN_HANDLED

    
// 2nd Argument is 0 or 1 depending on whether the id has abe
    
read_argv(2,temp,5)
    new 
hasPowers str_to_num(temp)

    
gHasAbePower[id] = (hasPowers != 0)

    return 
PLUGIN_HANDLED
}
//----------------------------------------------------------------------------------------------
public abe_kd()
{
    
// First Argument is an id who has abe
    
new temp[6]
    
read_argv(1,temp,5)
    new 
id str_to_num(temp)

    if(!
is_user_alive(id))
        return 
PLUGIN_HANDLED

    
// Use power once per round
    
if(!AbePowerUsed[id])
    {
        new 
origin[3], modelVictim[32], originVictim[3], weapons[32], wpname[32]
        new 
Float:anglesVictim[3]
        new 
bodyvictimIDweaponsCount

        
// Get target id
        
get_user_aiming(idvictimIDbody)
        if(
get_user_team(id) != get_user_team(victimID) && victimID && victimID <= SH_MAXSLOTS)
        {
            
emit_sound(idCHAN_AUTO"shmod/abe_sound.wav"VOL_NORMATTN_NORM0PITCH_NORM)

            
AbePowerUsed[id] = true

            
// Set victim's model to Abe
            
get_user_info(victimID"model"modelVictim32)
            
morph_model(idmodelVictim)

            
// Get origin from victim and Abe
            
get_user_origin(idorigin0)
            
get_user_origin(victimIDoriginVictim0)

            
// Set origin to victim Abe
            
set_user_origin(idoriginVictim)
            
set_user_origin(victimIDorigin)

            
// Get aiming from victim
            
pev(victimIDpev_anglesanglesVictim)

            
// Set aiming of victim to Abe
            
set_pev(idpev_anglesanglesVictim)
            
set_pev(idpev_fixangle1)

            
// Light effects (credits to AssKicR and JTP10181)
            
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
            
write_byte(8)
            
write_short(id// start entity
            
write_short(victimID// entity
            
write_short(LightSprite// model
            
write_byte(0// starting frame
            
write_byte(15// frame rate
            
write_byte(7// life
            
write_byte(50// line width
            
write_byte(30// noise amplitude
            
write_byte(255// r, g, b
            
write_byte(255// r, g, b
            
write_byte(255// r, g, b
            
write_byte(192// brightness
            
write_byte(0// scroll speed
            
message_end()

            
// Get armor, health, gravity and money from victim
            
new armor get_user_armor(victimID)
            new 
health get_user_health(victimID)
            new 
Float:gravity get_user_gravity(victimID)
            new 
money cs_get_user_money(victimID)

            
// Get victim's weapons
            
get_user_weapons(victimIDweaponsweaponsCount)

            
// Killing victim
            
user_kill(victimID1)

            
// Give armor, health, gravity and money to Abe
            
set_user_armor(idarmor)
            
set_user_health(idhealth)
            
set_user_gravity(idgravity)
            
cs_set_user_money(idmoney0)

            
// Give victim's weapons to Abe
            
for(new wpn 0wpn <= weaponsCountwpn++)
            {
                if(!
user_has_weapon(idweapons[wpn]))
                {
                    
get_weaponname(weapons[wpn], wpname31)
                    
give_item(idwpname)
                }
            }

            
client_print(idprint_chat"[SH](Abe) You have used your Abe power")
        }
        else
        {
            
client_print(idprint_chat"[SH](Abe) You have no target")
        }
    }
    else
    {
        
client_print(idprint_chat"[SH](Abe) You cannot use your Abe power on this round again")
    }
    return 
PLUGIN_HANDLED
}
//----------------------------------------------------------------------------------------------
public newSpawn(id)
{
    if(
gHasAbePower[id])
    {
        
unmorph_model(id)
        
AbePowerUsed[id] = false
    
}
}
//----------------------------------------------------------------------------------------------
public morph_model(idmodel[])
{
    if(!
gMorphed[id])
    {
        
cs_set_user_model(idmodel)
        
gMorphed[id] = true
    
}
}
//----------------------------------------------------------------------------------------------
public unmorph_model(id)
{
    if(
gMorphed[id])
    {
        
cs_reset_user_model(id)
        
gMorphed[id] = false
    
}
}
//---------------------------------------------------------------------------------------------- 
kendra is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 07-07-2012 , 08:31   Re: Hero: Abe
Reply With Quote #7

If you are going to edit it then at least write it using 1.2 ways.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
kendra
Senior Member
Join Date: Feb 2011
Location: Chile
Old 07-07-2012 , 14:56   Re: Hero: Abe
Reply With Quote #8

Quote:
Originally Posted by Jelle View Post
If you are going to edit it then at least write it using 1.2 ways.

I was just fixing a bug
kendra is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 07-07-2012 , 21:42   Re: Hero: Abe
Reply With Quote #9

Quote:
Originally Posted by kendra View Post
I was just fixing a bug
It still won't stand a chance to be approved when it is written using 1.18.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Bladell
Senior Member
Join Date: Jun 2012
Old 11-02-2012 , 05:06   Re: Hero: Abe
Reply With Quote #10

Can you add a cvar for inserting your spirit several times?
I mean that you can insert your spirit only once/round.Can you add a cvar for cooldown or max inserts?
Thanks
Bladell 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 04:32.


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