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

Help with ultimategoku!!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SHL RaMI
Junior Member
Join Date: Dec 2011
Location: Denmark
Old 03-07-2012 , 13:10   Help with ultimategoku!!!
Reply With Quote #1

Hey dude I have a problem with my hero ULTIMATEGOKU
I put all files and everything in the right places but then there's an error




Code:
Load fails: Invalid Plugin (plugin "sh_ultimategoku.amxx")



Code:
#include <amxmod>
#include <fun>
#include <superheromod>
#include <Vexd_utilities>

/****************************************
*
*  Modified by Batman
*  Made UltimateGoku to have laser penetrate through EVERYTHING including walls. Added aura to UltimateGoku
*  to make it more like DBZ.  Included a charge timer to further make it more like DBZ.
*  Made it so that UltimateGoku can fire 8 automatic blasts after he charges up.
*
*****************************************/


// UltimateGoku - Kamehameha! Created by Mr Sparkle
// Based on Cyclops Hero
// CVARS PASTE THIS IN SHCONFIG.CFG
// UltimateGoku_level
// UltimateGoku_laser_ammo          512
// UltimateGoku_laser_burndecals    1
// UltimateGoku_cooldown            20.0
// UltimateGoku_chargetime          12
// UltimateGoku_aura                15
// UltimateGoku_ammo                8
// UltimateGoku_maxdamage           1000
// UltimateGoku_radius              400

// VARIABLES
new gHeroName[]="Ultimate Goku"
new bool:g_HasUltimateGokuPower[SH_MAXSLOTS+1]
new gLastWeapon[SH_MAXSLOTS+1]
new g_chargeTimer[SH_MAXSLOTS+1]
new numOfShots[SH_MAXSLOTS+1]
//new bool:g_morphed[SH_MAXSLOTS+1]

// VARIABLES
new smoke 
new laser
new explosion 
new laser_shots[33] 

//Colors To Pick From ***DO NOT MODIFY***
#define CUSTOM		0
#define RED		1
#define GREEN		2
#define BLUE		3
#define LTBLUE		4
#define YELLOW		5
#define PURPLE		6
#define ORANGE		7

//Color Settings ***CHANGE COLOR HERE***
#define BEAM_COLOR CUSTOM		// Set beam color here, use color names from above (Default GREEN)
#define BEAM_ALPHA 255		// alpha value, visibility from 0-255 (Default 200)

//Color definitions
new BeamColors[8][3] = {
	{255, 255, 255},	// Custom, edit this one for a custom rgb value
	{255, 0, 0},		// Red
	{0, 255, 0},		// Green
	{0, 0, 255},		// Blue
	{0, 255, 255},		// Light Blue
	{255, 255, 0},		// Yellow
	{255, 0, 255},		// Purple
	{255, 128, 0}		// Orange
}

//----------------------------------------------------------------------------------------------
public plugin_init()
{
	// Plugin Info
	register_plugin("SUPERHERO UltimateGoku","1.0","Mr Sparkle")
 
	//THE EVENT TO CREATE THIS SUPERHERO!
	if ( isDebugOn() ) server_print("Attempting to create UltimateGoku Hero")
	register_cvar("UltimateGoku_level", "8" )
	shCreateHero(gHeroName, "SHL's Goku", "Press your Power key to Launch a Super Kamehameha!", true, "UltimateGoku_level" )
  
	// REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS)
	// INIT
	register_srvcmd("UltimateGoku_init", "UltimateGoku_init")
	shRegHeroInit(gHeroName, "UltimateGoku_init")
	register_event("ResetHUD","newRound","b")
  
	// DEFAULT THE CVARS
  
	// Let Server know about UltimateGoku Variable
	// It is possible that another hero has more hps, less gravity, or more armor
	// so rather than just setting these - let the superhero module decide each round
	shSetMaxSpeed(gHeroName, "UltimateGoku_speed", "[0]" )

	// KEY DOWN
	register_srvcmd("UltimateGoku_kd", "UltimateGoku_kd")
	shRegKeyDown(gHeroName, "UltimateGoku_kd")
	register_srvcmd("UltimateGoku_ku", "UltimateGoku_ku")
	shRegKeyUp(gHeroName, "UltimateGoku_ku")
  
	// Laser
	register_cvar("UltimateGoku_laser_ammo", "512")  // total # of shots...
	register_cvar("UltimateGoku_laser_burndecals", "1")
	register_cvar("UltimateGoku_cooldown", "20.0" )
        register_cvar("UltimateGoku_chargetime", "12")  //This is how long he has to charge up before he fires his beam.
        register_cvar("UltimateGoku_radius", "400")
        register_cvar("UltimateGoku_maxdamage", "1000")
        register_cvar("UltimateGoku_ammo", "8")  //How many Kamehameha he can fire before he has to charge again.

        //Aura
        register_cvar("UltimateGoku_aura", "15")

        //LOOP
        set_task(1.0, "UltimateGoku_loop", 0, "", 0, "b")

        for(new id = 1; id <= SH_MAXSLOTS; id++)
           g_chargeTimer[id] = -1
}
//----------------------------------------------------------------------------------------------
public plugin_precache()
{
	smoke = precache_model("sprites/steam1.spr") 
	laser = precache_model("sprites/laserbeam.spr") 
        explosion = precache_model("sprites/zerogxplode.spr")
	precache_sound("shmod/UltimateGoku1.wav") //This is the new sound for UltimateGoku.
	precache_sound("weapons/xbow_hitbod2.wav")
        precache_sound("weapons/explode3.wav") 
}
//----------------------------------------------------------------------------------------------
public UltimateGoku_init()
{
	new temp[128]
	// First Argument is an id
	read_argv(1,temp,5)
	new id=str_to_num(temp)
  
	// 2nd Argument is 0 or 1 depending on whether the id has UltimateGoku
	read_argv(2,temp,5)
	new hasPowers=str_to_num(temp)
	g_HasUltimateGokuPower[id]=(hasPowers!=0)

        if(hasPowers){
           //set_task(1.0, "UltimateGoku_morph", id)
        }
  
	// Got to slow down a UltimateGoku that lost his powers...
	if ( !hasPowers  && is_user_connected(id) )
	{
	shRemSpeedPower(id)
        //UltimateGoku_unmorph(id)
        //g_HasChargeTimer[id] = false
	}
}
//----------------------------------------------------------------------------------------------
/*public UltimateGoku_morph(id)
{
   if(g_morphed[id] == true || !is_user_alive(id))
      return
   #if defined AMXX_VERSION
      cs_set_user_model("UltimateGoku")
   #else
      CS_SetModel("UltimateGoku")
   #endif
   g_morphed[id] = true
}
//----------------------------------------------------------------------------------------------
public UltimateGoku_unmorph(id)
{
   if(g_morphed[id] == true){
      #if defined AMXX_VERSION
         cs_reset_user_model(id)
      #else
         CS_ClearModel(id)
      #endif
      g_morphed[id] = false
   }
}*/
//----------------------------------------------------------------------------------------------
public newRound(id)
{
        if(g_HasUltimateGokuPower[id]){
	   laser_shots[id] = get_cvar_num("UltimateGoku_laser_ammo")
	   //set_user_rendering(id,kRenderGlow,0,128,0,kRenderFxNone,255)
	   gPlayerUltimateUsed[id]=false
           g_chargeTimer[id] = -1
           set_cvar_num("UltimateGoku_ammo", 8)
           //set_task(1.0, "UltimateGoku_morph", id)
           //remove_task(id)
        }
	return PLUGIN_HANDLED
}
//----------------------------------------------------------------------------------------------
// RESPOND TO KEYDOWN
public UltimateGoku_kd() 
{ 
	new temp[6] 

	if ( !hasRoundStarted() ) return PLUGIN_HANDLED 

	// First Argument is an id with UltimateGoku Powers! 
	read_argv(1,temp,5) 
	new id=str_to_num(temp) 
	if ( !is_user_alive(id) ) return PLUGIN_HANDLED 

        //This is incase someone presses the key down while UltimateGoku is still charging.
        if(gPlayerUltimateUsed[id] || g_chargeTimer[id] > -1){
           playSoundDenySelect(id)
           return PLUGIN_HANDLED
        }

        g_chargeTimer[id] = get_cvar_num("UltimateGoku_chargetime")  //This defines how much time he has for charging, 12 seconds
	numOfShots[id] = get_cvar_num("UltimateGoku_ammo")

	// Remember this weapon...
	new clip,ammo,weaponID=get_user_weapon(id,clip,ammo);
	gLastWeapon[id]=weaponID   
  

        //The line below activates the sound for UltimateGoku.
	emit_sound(id,CHAN_VOICE, "shmod/UltimateGoku1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) 

        //THIS LINE IS TO START UP CHARGING TIME (DO NOT CHANGE THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING!)
        //if(g_HasChargeTimer[id] == false){
           //set_task(1.0, "UltimateGoku_loop", 0, "", 0, "b")
           //g_HasChargeTimer[id] = true
        //}

        if(get_cvar_float("UltimateGoku_cooldown") > 0.0){
           ultimateTimer(id, get_cvar_num("UltimateGoku_cooldown") * 1.0)  //This is the cooldown time until user can fire the beam again.
        }
	return PLUGIN_HANDLED
}
//----------------------------------------------------------------------------------------------
public UltimateGoku_loop()  //This is total rip from nightcrawler loop, except some editing has been done to it.
{
	for ( new id = 1; id <= SH_MAXSLOTS; id++ ) {
		if ( g_HasUltimateGokuPower[id] && is_user_alive(id)  )  {
			if ( g_chargeTimer[id] > 0 ) {
                                if(numOfShots[id] > 0){
				   new message[128]
				   format(message, 127, "%d seconds left of Charging up.", g_chargeTimer[id] )
				   set_hudmessage(255,0,0,-1.0,0.3,0,1.0,1.2,0.0,0.0,87)
				   show_hudmessage( id, message)
                                }
                                set_user_rendering(id, kRenderFxGlowShell, get_cvar_num("UltimateGoku_aura"), get_cvar_num("UltimateGoku_aura"), 0, kRenderNormal, 16) //makes user glow yellow.
                                if(get_cvar_num("UltimateGoku_aura") < 255){
                                   set_cvar_num("UltimateGoku_aura", get_cvar_num("UltimateGoku_aura") + 20)  //This line will intensify the brightness of the user.
                                }
				g_chargeTimer[id]--
			}
			else if ( g_chargeTimer[id] == 0) {
                                set_user_rendering(id, kRenderFxGlowShell, 255, 255, 0, kRenderNormal, 16)  //makes user shine bright yellow
                                if(get_cvar_num("UltimateGoku_ammo") > 0){
                                   new message[128]
                                   format(message, 127, "SUPER KAMEHAMEHA!!!")
				   set_hudmessage(255,0,0,-1.0,0.3,0,1.0,1.2,0.0,0.0,87)
                                   show_hudmessage(id, message)
                                }
                                if(numOfShots[id] > 0){
                                   fire_laser(id)
                                   g_chargeTimer[id] = 3
                                   numOfShots[id]--
                                }
                                else{
                                   g_chargeTimer[id]--
                                   numOfShots[id] = get_cvar_num("UltimateGoku_ammo")
                                   break
                                }
                                
			}
		}
	}
}
//----------------------------------------------------------------------------------------------
public UltimateGoku_ku()
{
	new temp[6] 

	// First Argument is an id with UltimateGoku Powers! 
	read_argv(1,temp,5) 
	new id=str_to_num(temp) 

        if(g_chargeTimer[id] < 0)
	   remove_task(id)

	// Switch back to previous weapon... 
        if ( gLastWeapon[id]!=CSW_KNIFE ) shSwitchWeaponID( id, gLastWeapon[id])
}

//----------------------------------------------------------------------------------------------
public laserEffects(id, aimvec[3] )
{
	new choose_decal,decal_id 


	choose_decal = random_num(0,2)
	switch(choose_decal)
	{ 
	case 0: decal_id = 46  //28
	case 1: decal_id = 47 //103
	case 2: decal_id = 48 //198
	case 3: decal_id = 30 //199   
	} 

	new origin[3]
	get_user_origin(id, origin, 1)

	new colornum = BEAM_COLOR
	new colors[3]

	if (colornum < 0 || colornum >= 8) {
		//If invalid value set it to default light blue
		colornum = 4
	}
	colors = BeamColors[colornum]
  
	// DELIGHT
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY) 
	write_byte(27) 
	write_coord(origin[0]) //pos 
	write_coord(origin[1]) 
	write_coord(origin[2])
	write_byte(10)
	write_byte(255) // r, g, b (red)
	write_byte(255) // r, g, b (green)
	write_byte(255) // r, g, b (blue)
	write_byte(10) // life
	write_byte(5) // decay
	message_end() 
    
	//BEAMENTPOINTS
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY) 
	write_byte ( 0 )     //TE_BEAMENTPOINTS 0  
	write_coord(origin[0]) 
	write_coord(origin[1]) 
	write_coord(origin[2]) 
	write_coord(aimvec[0]) 
	write_coord(aimvec[1]) 
	write_coord(aimvec[2]) 
	write_short(laser) 
	write_byte(1) // framestart 
	write_byte(5) // framerate 
	write_byte(10) // life 
	write_byte(255) // width 
	write_byte(0) // noise 
	write_byte(255) // r, g, b (red)
	write_byte(255) // r, g, b (green)
	write_byte(255) // r, g, b (blue)
	write_byte(BEAM_ALPHA) // brightness 
	write_byte(1) // speed 
	message_end() 
  
	//Sparks 
	message_begin( MSG_PVS, SVC_TEMPENTITY) 
	write_byte(9) 
	write_coord(aimvec[0]) 
	write_coord(aimvec[1]) 
	write_coord(aimvec[2]) 
	message_end() 
  
	//Smoke    
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY) 
	write_byte(5) // 5 
	write_coord(aimvec[0]) //position
	write_coord(aimvec[1]) 
	write_coord(aimvec[2]) 
	write_short(smoke) 
	write_byte(22)  // 10 
	write_byte(10)  // 10 
	message_end() 

        emit_sound(id, CHAN_ITEM, "weapons/explode3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) 

        //Explosion
        message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
        write_byte(3)
        write_coord(aimvec[0])
        write_coord(aimvec[1])
        write_coord(aimvec[2])
        write_short(explosion)
        write_byte(200) //This will make the explosion big
        write_byte(20) //The framerate
        write_byte(0)  //The flag, 0 makes default half-life explosions
        message_end()
        

	if(get_cvar_num("UltimateGoku_laser_burndecals") == 1)
	{
	//TE_GUNSHOTDECAL 
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY) 
	write_byte( 109 ) // decal and ricochet sound 
	write_coord(aimvec[0]) //pos 
	write_coord(aimvec[1]) 
	write_coord(aimvec[2]) 
	write_short (0) // I have no idea what thats supposed to be 
	write_byte (decal_id) //decal 
	message_end() 
	}
}
//----------------------------------------------------------------------------------------------
public fire_laser(id)
{
   new aimvec[3]
   new FFOn = get_cvar_num("mp_friendlyfire")

   new Float:damageRatio, damage, distance
   new damageRadius = get_cvar_num("UltimateGoku_radius")
   new maximumDamage = get_cvar_num("UltimateGoku_maxdamage")

   if(!is_user_alive(id) ) return
   get_user_origin(id, aimvec, 3)
   laserEffects(id, aimvec)

   for(new vic = 1; vic <= SH_MAXSLOTS; vic++){
      if(is_user_alive(vic) && (get_user_team(id) != get_user_team(vic) || FFOn || vic == id) ){
         new origin[3]
         get_user_origin(vic, origin, 0)
         distance = get_distance(aimvec, origin)
         if(distance < damageRadius){
            damageRatio = float(distance)/float(damageRadius)
            damage = maximumDamage - floatround(maximumDamage * damageRatio)
            if(vic == id) damage = floatround(damage/2.0)
            shExtraDamage(vic, id, damage, "Super Kamehameha!")
         }
      }
   }
}
//----------------------------------------------------------------------------------------------
public client_disconnect(id)
{
	// stupid check but lets see
	if ( id <=0 || id>32 ) return PLUGIN_CONTINUE

	// Yeah don't want any left over residuals
	remove_task(id)
  
	return PLUGIN_CONTINUE  
}
//----------------------------------------------------------------------------------------------


PLS HELP ME AND THANKS

Last edited by SHL RaMI; 03-10-2012 at 11:41.
SHL RaMI is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 03-07-2012 , 16:25   Re: Help with ultimategoku!!!
Reply With Quote #2

You spelled the name wrong in plugins-shero.ini. That is not a code problem.

Also, when posting code, do it in [code] tags, else it is way too messy and no one in here will read it.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
SHL RaMI
Junior Member
Join Date: Dec 2011
Location: Denmark
Old 03-10-2012 , 06:40   Re: Help with ultimategoku!!!
Reply With Quote #3

I've spelled it right and have put all files in the right places but then comes this error



Code:
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/tmp/textGzNyL4.sma(6) : fatal error 100: cannot read from file: "Vexd_utilities"

Compilation aborted.
1 Error.
SHL RaMI is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 03-10-2012 , 07:50   Re: Help with ultimategoku!!!
Reply With Quote #4

Read the error instead of just posting it.

It says that there is a file it cannot read. That must be because either the file is damaged or maybe it is not even there at all.

hint: It needs to be in the include folder, and the file type is .inc.

Search on google for it, it is easy to find so I won´t be bothered to find it for you.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 03-10-2012 , 10:35   Re: Help with ultimategoku!!!
Reply With Quote #5

vexd is not preferred on a "modern" sh server but I guess if you want the hero you'll have to go with it, but yeh the "normal" Goku and the others are much better.
__________________
The Art of War is offline
SHL RaMI
Junior Member
Join Date: Dec 2011
Location: Denmark
Old 03-11-2012 , 06:20   Re: Help with ultimategoku!!!
Reply With Quote #6

I've fixed it I just had to rename "Vexd_utilities" to
"Engine"
SHL RaMI is offline
SimonLANO
Member
Join Date: Dec 2008
Old 06-13-2012 , 17:49   Re: Help with ultimategoku!!!
Reply With Quote #7

Why does the "UltimateGoku1.wav" sound stops whenever you get hit by bullets?
__________________
[SS]Superhero By 8Ball | 10 Free Levels | Max 50 Level | FastDL


Join us now !
SimonLANO is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 06-13-2012 , 20:22   Re: Help with ultimategoku!!!
Reply With Quote #8

Quote:
Originally Posted by SimonLANO View Post
Why does the "UltimateGoku1.wav" sound stops whenever you get hit by bullets?
Because it uses emit_sound which is getting overwritten by the engine, so what you hear is the bullet as that is emitted after.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
santoo
New Member
Join Date: Jun 2012
Old 06-26-2012 , 17:33   Re: Help with ultimategoku!!!
Reply With Quote #9

I got the same problem to, i've compiled and puted the cvars still not working. Someone can re-do this hero?
santoo is offline
SHL RaMI
Junior Member
Join Date: Dec 2011
Location: Denmark
Old 07-11-2012 , 19:19   Re: Help with ultimategoku!!!
Reply With Quote #10

Quote:
Originally Posted by santoo View Post
I got the same problem to, i've compiled and puted the cvars still not working. Someone can re-do this hero?
Go replace "Engine" with "amxmisc"


I think
__________________
What the hell im doing here

Last edited by SHL RaMI; 07-11-2012 at 19:21.
SHL RaMI 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 19:39.


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