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

golden ak


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
loztdevil
Member
Join Date: Oct 2011
Location: The Netherlands
Old 12-26-2011 , 09:10   golden ak
Reply With Quote #1

I want to have the hero golden ak in my server i find this plugin:
PHP Code:
//Golden AK! - Golden AK with more Damage 

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

//Golden AK  
Golden AK_level 4  
Golden AK_health 100    //Default 100 (no extra health) 
Golden AK_armor 100        //Default 150 
Golden AK_gravity 800    //Default 1.0 = no extra gravity (0.50 is 50% normal gravity, ect.) 
Golden AK_speed 320        //Default -1 = no extra speed, this cvar is for all weapons (for faster then normal speed set to 261 or higher) 
Golden AK_ak47mult 1.5        //Damage multiplyer for his ak47  
*/ 

#include <amxmodx> 
#include <superheromod> 
#include <fakemeta>  
new HeroName[] = "Golden AK!" 
new bool:HasHero[SH_MAXSLOTS+1
  
new 
Cvarak47DmgMult  
public plugin_init() 

    
// Plugin Info 
    
register_plugin("SUPERHERO Golden AK","0.1","Peter Griffin"
     
    
// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG 
    
register_cvar("Golden AK_level""4"
    
register_cvar("Golden AK_health""100"
    
register_cvar("Golden AK_armor""100"
    
register_cvar("Golden AK_gravity""800"
    
register_cvar("Golden AK_speed""320"
    
Cvarak47DmgMult register_cvar("Golden AK_ak47mult""1.5")  

    
// FIRE THE EVENT TO CREATE THIS SUPERHERO! 
    
shCreateHero(HeroName"New WeaponModel + XtraDmg""Golden AK with more Damage"false"Golden AK_level"
     
    
// REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS) 
    // INIT 
    
register_srvcmd("Golden AK_init""Golden AK_init"
    
shRegHeroInit(HeroName"Golden AK_init"
         
    
// EVENTS 
  
    
register_event("CurWeapon""weapon_change""be""1=1"
    
register_event("Damage""Golden AK_damage""b""2!0")  
    
// Let Server know about the hero's variables 
    
shSetShieldRestrict(HeroName
    
shSetMaxHealth(HeroName"Golden AK_health"
    
shSetMaxArmor(HeroName"Golden AK_armor"
    
shSetMinGravity(HeroName"Golden AK_gravity"
    
shSetMaxSpeed(HeroName"Golden AK_speed""[0]"

public 
plugin_precache() 
{  
    
precache_model("models/shmod/p_ak47.mdl"
    
precache_model("models/shmod/v_ak47.mdl"
    }  
public 
Golden AK_init() 

    
// First Argument is an id 
    
new temp[6
    
read_argv(1temp5
    new 
id str_to_num(temp
    
// 2nd Argument is 0 or 1 depending on whether the id has the hero 
    
read_argv(2temp5
    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) ) 
            {  
                
Golden AK_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_ak47")  
                  
                
shRemHealthPower(id
                
shRemArmorPower(id
                
shRemGravityPower(id
                
shRemSpeedPower(id
            } 
    
HasHero[id] = false  

            

    }  


  

public 
Golden AK_weapons(id

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

    
shGiveWeapon(id"weapon_ak47"

switch_model(id

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

    new 
clipammowpnid get_user_weapon(idclipammo

    if ( 
wpnid == CSW_AK47 
    { 
        
set_pev(idpev_viewmodel2"models/shmod/p_ak47.mdl"
        
set_pev(idpev_weaponmodel2"models/shmod/v_ak47.mdl"
    } 

public 
weapon_change(id

    if ( !
shModActive() || !HasHero[id] ) 
        return 

    new 
wpnid read_data(2

    if ( 
wpnid != CSW_AK47 
        return 

    
switch_model(id

    new 
clip read_data(3

    
// Never Run Out of Ammo! 
    
if ( clip == 
        
shReloadAmmo(id

public 
Golden AK_damage(id

    if ( !
shModActive() || !is_user_alive(id) ) 
        return 

    new 
weaponbodypartattacker get_user_attacker(idweaponbodypart

    if ( 
attacker <= || attacker SH_MAXSLOTS 
        return 

    if ( 
HasHero[attacker] && weapon == CSW_AK47 && is_user_alive(id) ) 
    { 
        new 
damage read_data(2
        new 
headshot bodypart == 

        
// do extra damage 
        
new extraDamage floatround(damage get_pcvar_float(Cvarak47DmgMult) - damage
        if ( 
extraDamage 
            
shExtraDamage(idattackerextraDamage"ak47"headshot
    } 

But when i want to compile it i get these errors:
PHP Code:
/tmp/textKmfKtA.sma(59) : error 001expected token";"but found "-identifier-"
/tmp/textKmfKtA.sma(106) : error 021symbol already defined"Golden"
/tmp/textKmfKtA.sma(144) : error 021symbol already defined"Golden"
/tmp/textKmfKtA.sma(164) : warning 203symbol is never used"AK_damage"
/tmp/textKmfKtA.sma(164) : warning 203symbol is never used"AK_init"
/tmp/textKmfKtA.sma(164) : warning 203symbol is never used"AK_weapons" 
any one know how to get it to compile?
loztdevil is offline
loztdevil
Member
Join Date: Oct 2011
Location: The Netherlands
Old 12-26-2011 , 09:51   Re: golden ak
Reply With Quote #2

I got the hero in my server now but i dont get a free ak in my weapenlist.
and when i have a ak it's not a golden ak.
I got now this plugin:

PHP Code:
//Golden AK! - Golden AK with more Damage 

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

//Golden AK  
Golden AK_level 4  
Golden AK_health 100    //Default 100 (no extra health) 
Golden AK_armor 100        //Default 150 
Golden AK_gravity 800    //Default 1.0 = no extra gravity (0.50 is 50% normal gravity, ect.) 
Golden AK_speed 320        //Default -1 = no extra speed, this cvar is for all weapons (for faster then normal speed set to 261 or higher) 
Golden AK_ak47mult 1.5        //Damage multiplyer for his ak47  
*/ 

#include <amxmodx>
#include <superheromod>
#include <fakemeta>  
new HeroName[] = "Golden AK!" 
new bool:HasHero[SH_MAXSLOTS+1
  
new 
Cvarak47DmgMult  
public plugin_init() 

    
// Plugin Info 
    
register_plugin("SUPERHERO Golden AK","0.1","Peter Griffin"
     
    
// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG 
    
register_cvar("GoldenAK_level""4"
    
register_cvar("GoldenAK_health""100"
    
register_cvar("GoldenAK_armor""100"
    
register_cvar("GoldenAK_gravity""800"
    
register_cvar("GoldenAK_speed""320"
    
Cvarak47DmgMult register_cvar("GoldenAK_ak47mult""1.5")  

    
// FIRE THE EVENT TO CREATE THIS SUPERHERO! 
    
shCreateHero(HeroName"New WeaponModel + XtraDmg""Golden AK with more Damage"false"GoldenAK_level"
     
    
// REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS) 
    // INIT 
    
register_srvcmd("Golden AK_init""GoldenAK_init"
    
shRegHeroInit(HeroName"GoldenAK_init"
         
    
// EVENTS 
  
    
register_event("CurWeapon""weapon_change""be""1=1"
    
register_event("Damage""GoldenAK_damage""b""2!0")  
    
// Let Server know about the hero's variables 
    
shSetShieldRestrict(HeroName
    
shSetMaxHealth(HeroName"GoldenAK_health"
    
shSetMaxArmor(HeroName"GoldenAK_armor"
    
shSetMinGravity(HeroName"GoldenAK_gravity"
    
shSetMaxSpeed(HeroName"GoldenAK_speed""[0]"

public 
plugin_precache() 
{  
    
precache_model("models/shmod/p_ak47.mdl"
    
precache_model("models/shmod/v_ak47.mdl"
    }  
public 
GoldenAK_init() 

    
// First Argument is an id 
    
new temp[6
    
read_argv(1temp5
    new 
id str_to_num(temp
    
// 2nd Argument is 0 or 1 depending on whether the id has the hero 
    
read_argv(2temp5
    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) ) 
            {  
                
GoldenAK_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_ak47")  
                  
                
shRemHealthPower(id
                
shRemArmorPower(id
                
shRemGravityPower(id
                
shRemSpeedPower(id
            } 
    
HasHero[id] = false  

            

    }  


  

public 
GoldenAK_weapons(id

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

    
shGiveWeapon(id"weapon_ak47"

switch_model(id

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

    new 
clipammowpnid get_user_weapon(idclipammo

    if ( 
wpnid == CSW_AK47 
    { 
        
set_pev(idpev_viewmodel2"models/shmod/p_ak47.mdl"
        
set_pev(idpev_weaponmodel2"models/shmod/v_ak47.mdl"
    } 

public 
weapon_change(id

    if ( !
shModActive() || !HasHero[id] ) 
        return 

    new 
wpnid read_data(2

    if ( 
wpnid != CSW_AK47 
        return 

    
switch_model(id

    new 
clip read_data(3

    
// Never Run Out of Ammo! 
    
if ( clip == 
        
shReloadAmmo(id

public 
GoldenAK_damage(id

    if ( !
shModActive() || !is_user_alive(id) ) 
        return 

    new 
weaponbodypartattacker get_user_attacker(idweaponbodypart

    if ( 
attacker <= || attacker SH_MAXSLOTS 
        return 

    if ( 
HasHero[attacker] && weapon == CSW_AK47 && is_user_alive(id) ) 
    { 
        new 
damage read_data(2
        new 
headshot bodypart == 

        
// do extra damage 
        
new extraDamage floatround(damage get_pcvar_float(Cvarak47DmgMult) - damage
        if ( 
extraDamage 
            
shExtraDamage(idattackerextraDamage"ak47"headshot
    } 

loztdevil is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 01-02-2012 , 16:58   Re: golden ak
Reply With Quote #3

You should go to the SuperHero section instead. Or at least in AMXX.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 01-02-2012 , 17:15   Re: golden ak
Reply With Quote #4

Quote:
Originally Posted by bibu View Post
You should go to the SuperHero section instead. Or at least in AMXX.
You should look at what forum you are actually posting in.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Reply


Thread Tools
Display Modes

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 15:20.


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