Raised This Month: $ Target: $400
 0% 

SSJGOHAN


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dawe
Member
Join Date: Jan 2006
Location: sweden
Old 07-21-2006 , 12:11   SSJGOHAN
Reply With Quote #1

Hi can someone help me with this script??
As you can see its SSJgohan but i have put in mdl codes form master cheif but there is 8 erros plz fix it!!!



here is the 8 errors

sh_ssjgohan.sma(100) : error 017: undefined symbol "gssjgohanSound"
sh_ssjgohan.sma(629) : error 017: undefined symbol "ssjgohan_sound"
sh_ssjgohan.sma(651) : error 017: undefined symbol "ssjgohan_sound"
sh_ssjgohan.sma(661) : error 054: unmatched closing brace
sh_ssjgohan.sma(673) : error 017: undefined symbol "gHasssjgohanPower"
sh_ssjgohan.sma(673) : warning 215: expression has no effect
sh_ssjgohan.sma(673) : error 001: expected token: ";", but found "]"
sh_ssjgohan.sma(673) : error 029: invalid expression, assumed zero
sh_ssjgohan.sma(673) : fatal error 107: too many error messages on one line

Compilation aborted.
8 Errors.
Could not locate output file compiled\amxx\sh_ssjgohan.amx (compile failed).
Welcome to the AMX Mod X 1.50-300 Compiler.
Copyright (c) 1997-2005 ITB CompuPhase, AMX Mod X Team

Code:
// SUPER SAIYAN GOHAN! - from Dragon Ball, Z, GT series. Gohan is Goku and Chi-Chi's first son.

/* CVARS - copy and paste to shconfig.cfg

//Super Saiyan Gohan
ssjgohan_level 9
ssjgohan_damage 125			//Damage spread over radius of blast (Default 125)
ssjgohan_radius 300			//Radius of the damage (Default 300)
ssjgohan_cooldown 30		//Seconds til next available use from power explode (Default 30)
ssjgohan_powerspeed 1000		//Speed of Kamehameha, min-500 max-2000 (Default 1000)
ssjgohan_blast_decals 1		//Show the burn decals from blast (Default 1)

*/

/*
* v1.0 - vittu - 12/2/05
*      - Fixed to ssjgohan_blast_decals cvar named incorrectly in code.
*          Thanks to Om3g[A] for pointing it out.
*
* v1.0 - vittu - 9/17/05
*
*   Entity creation partially based on Bazooka, which is based on Missiles Launcher 3.8.2 by Eric Lidman & jtp10181.
*   Extra sprites and sounds used from Earth's Special Forces a HL mod - http://www.esforces.com/
*/

#include <amxmod>
#include <Vexd_Utilities>
#include <superheromod>

// GLOBAL VARIBLES
new g_heroName[]="Super Saiyan Gohan"
new bool:g_hasSSJGohan[SH_MAXSLOTS+1]
new bool:gmorphed[SH_MAXSLOTS+1]
new bool:g_usingPower[SH_MAXSLOTS+1]
new bool:g_chargeOver[SH_MAXSLOTS+1]
new bool:g_powerKeyUsed[SH_MAXSLOTS+1]
new bool:g_betweenRounds
new g_powerID[SH_MAXSLOTS+1]
new g_lastWeapon[SH_MAXSLOTS+1]
new g_msgBarTime
new g_spriteSmoke, g_spriteTrail, g_spriteExplosion

new gSSJGohanSound[]="items/suitchargeno1.wav" 

static const g_burnDecal[3] = {28, 29, 30}
static const g_burnDecalBig[3] = {46, 47, 48}
//----------------------------------------------------------------------------------------------
public plugin_init()
{
	// Plugin Info
	register_plugin("SUPERHERO Super Saiyan Gohan", "1.0", "vittu")

	// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
	register_cvar("ssjgohan_level", "9")
	register_cvar("ssjgohan_teamglow", "0") 
	register_cvar("ssjgohan_damage", "125")
	register_cvar("ssjgohan_radius", "300")
	register_cvar("ssjgohan_cooldown", "30")
	register_cvar("ssjgohan_powerspeed", "1000")
	register_cvar("ssjgohan_blast_decals", "1")

	// FIRE THE EVENT TO CREATE THIS SUPERHERO!
	shCreateHero(g_heroName, "Guided Kamehameha", "Hold +power key down to charge, and release to fire your Kamehameha.", true, "ssjgohan_level")

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

	// KEY DOWN
	register_srvcmd("ssjgohan_kd", "ssjgohan_kd")
	shRegKeyDown(g_heroName, "ssjgohan_kd")

	// KEY UP
	register_srvcmd("ssjgohan_ku", "ssjgohan_ku")
	shRegKeyUp(g_heroName, "ssjgohan_ku")

	// EVENTS
	register_event("ResetHUD", "newSpawn", "b")
	register_event("CurWeapon", "curweapon", "be", "1=1")
	register_event("DeathMsg", "ssjgohan_death", "a") 

	// LOG EVENTS
	register_logevent("round_start", 2, "1=Round_Start")
	register_logevent("round_end", 2, "1=Round_End")
	register_logevent("round_end", 2, "1&Restart_Round_")

	// Let Server know about ssjgohan's Variables 
                shSetShieldRestrict(gHeroName) 

	g_msgBarTime = get_user_msgid("BarTime")
}
//----------------------------------------------------------------------------------------------
public plugin_precache()
{
	precache_model("models/player/ssjgohan/ssjgohan.mdl")
	precache_sound("shmod/ssjgohan_kamehame.wav")
	precache_sound("shmod/ssjgohan_ha.wav")
	precache_sound("shmod/esf_beamhead.wav")
	precache_sound(gssjgohanSound) 
	precache_model("sprites/shmod/esf_kamehameha_blue.spr")
	g_spriteTrail = precache_model("sprites/shmod/esf_trail_blue.spr")
	g_spriteExplosion = precache_model("sprites/shmod/esf_exp_blue.spr")
	g_spriteSmoke = precache_model("sprites/wall_puff4.spr")
	
	
}
//----------------------------------------------------------------------------------------------
public ssjgohan_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 gets run if they had the power but don't anymore
	if ( !hasPowers && g_hasSSJGohan[id] ){
		// remove the power if it was used and user dropped hero
		if ( g_powerID[id] > 0 ) {
			remove_power(id, g_powerID[id])
		}
	}

	// Sets this variable to the current status
	g_hasSSJGohan[id] = (hasPowers != 0)
}
//----------------------------------------------------------------------------------------------
public newSpawn(id)
{
	gPlayerUltimateUsed[id] = false
	g_usingPower[id] = false
	g_powerKeyUsed[id] = false
}
//---------------------------------------------------------------------------------------------- 
public SSJGohan_tasks(id) 
{ 
set_task(1.0, "SSJGohan_morph", id) 

if( get_cvar_num("SSJGohan_teamglow") ){ 
set_task(1.0, "SSJGohan_glow", id+100, "", 0, "b") 
     } 
} 
//----------------------------------------------------------------------------------------------
public SSJGohan_sound(id) 
{ 
new SND_STOP = (1<<5) 
emit_sound(id, CHAN_AUTO, gSSJGohanSound, 0.2, ATTN_NORM, SND_STOP, PITCH_NORM) 
emit_sound(id, CHAN_AUTO, gSSJGohanSound, 0.2, ATTN_NORM, 0, PITCH_NORM) 
} 
//----------------------------------------------------------------------------------------------
// RESPOND TO KEYDOWN
public ssjgohan_kd()
{
	if ( g_betweenRounds ) return

	// First Argument is an id
	new temp[6]
	read_argv(1,temp,5)
	new id = str_to_num(temp)

	if ( !is_user_alive(id) || !g_hasSSJGohan[id] ) return

	if ( gPlayerUltimateUsed[id] ) {
		playSoundDenySelect(id)
		client_print(id, print_chat, "[SH](Super Saiyan Gohan) Not enough KI, you must wait longer")
		return
	}

	// Prevent too many entities, which would cause server problems
	if ( g_powerID[id] ) {
		playSoundDenySelect(id)
		client_print(id, print_chat, "[SH](Super Saiyan Gohan) Already using Kamehameha Attack")
		return
	}

	// Remember this weapon...
	new clip, ammo, weaponID = get_user_weapon(id, clip, ammo)
	g_lastWeapon[id] = weaponID
	// Switch to knife
	engclient_cmd(id, "weapon_knife")

	// Set some variables
	g_usingPower[id] = true
	g_powerKeyUsed[id] = true
	g_chargeOver[id] = false

	emit_sound(id, CHAN_STATIC, "shmod/ssjgohan_kamehame.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

	// Show a progress bar for time til charge is full
	progressBar(id, 4)

	// Must wait for full bar time/sound til power can be used, this task will set it ok
	set_task(4.0, "powerCharged", id)
}
//----------------------------------------------------------------------------------------------
public ssjgohan_ku()
{
	if ( g_betweenRounds ) return

	// First Argument is an id
	new temp[6]
	read_argv(1,temp,5)
	new id = str_to_num(temp)

	if ( !is_user_connected(id) ) return

	// User did not wait long enough.
	if ( !g_chargeOver[id] ) {

		remove_task(id)

		// Stop the sound
		new sndStop=(1<<5)
		emit_sound(id, CHAN_STATIC, "shmod/ssjgohan_kamehame.wav", 1.0, ATTN_NORM, sndStop, PITCH_NORM)

		// Remove progress bar
		progressBar(id, 0)

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

		g_usingPower[id] = false
		g_powerKeyUsed[id] = false

		return
	}

	if ( !is_user_alive(id) || !g_hasSSJGohan[id] || !g_powerKeyUsed[id] ) return

	// Stop the sound
	new sndStop=(1<<5)
	emit_sound(id, CHAN_STATIC, "shmod/ssjgohan_kamehame.wav", 1.0, ATTN_NORM, sndStop, PITCH_NORM)

	emit_sound(id, CHAN_STATIC, "shmod/ssjgohan_ha.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

	// Remove progress bar
	progressBar(id, 0)

	set_user_maxspeed(id, 1.0)

	create_power(id)

	g_powerKeyUsed[id] = false
}
//----------------------------------------------------------------------------------------------
public powerCharged(id)
{
	g_chargeOver[id] = true
}
//----------------------------------------------------------------------------------------------
progressBar(id, seconds)
{
	message_begin(MSG_ONE, g_msgBarTime, {0,0,0}, id)
	write_byte(seconds)
	write_byte(0)
	message_end()
}
//----------------------------------------------------------------------------------------------
public create_power(id)
{
	// Seting entSpeed higher then 2000.0 will not go where you aim
	// Vec Mins/Maxes must be below +/- 5.0 to make a burndecal

	new Float:fl_Origin[3], Float:fl_Angles[3], Float:fl_vAngle[3]
	new Float:VecMins[3] = {-2.0,-2.0,-2.0}
	new Float:VecMaxs[3] = {2.0,2.0,2.0}

	// Get users postion and angles (angles are probably not needed in this case)
	Entvars_Get_Vector(id, EV_VEC_origin, fl_Origin)
	Entvars_Get_Vector(id, EV_VEC_angles, fl_Angles)
	Entvars_Get_Vector(id, EV_VEC_v_angle, fl_vAngle)

	new newEnt = CreateEntity("info_target")
	if ( newEnt == 0 ) {
		client_print(id, print_chat, "[SH](Super Saiyan Gohan) Power Creation Failure")
		return
	}

	g_powerID[id] = newEnt

	Entvars_Set_String(newEnt, EV_SZ_classname, "ssjgohan_kamehameha")
	ENT_SetModel(newEnt, "sprites/shmod/esf_kamehameha_blue.spr")

	// Set entity size
	Entvars_Set_Vector(newEnt, EV_VEC_mins, VecMins)
	Entvars_Set_Vector(newEnt, EV_VEC_maxs, VecMaxs)

	// Change height of entity origin to hands
	fl_Origin[2] += 6

	// Set entity postion and angles
	ENT_SetOrigin(newEnt, fl_Origin)
	Entvars_Set_Vector(newEnt, EV_VEC_angles, fl_Angles)
	Entvars_Set_Vector(newEnt, EV_VEC_v_angle, fl_vAngle)

	// Set properties of the entity
	Entvars_Set_Int(newEnt, EV_INT_solid, 2)
	Entvars_Set_Int(newEnt, EV_INT_movetype, 5)
	Entvars_Set_Int(newEnt, EV_INT_rendermode, 5)
	Entvars_Set_Float( newEnt, EV_FL_renderamt, 255.0)
	Entvars_Set_Float( newEnt, EV_FL_scale, 1.20)
	Entvars_Set_Edict(newEnt, EV_ENT_owner, id)

	// Create a VelocityByAim() function, but instead of users
	// eyesight make it start from the entity's origin - vittu
	new Float:fl_Velocity[3], AimVec[3], entOrigin[3]
	new Float:entSpeed = get_cvar_float("ssjgohan_powerspeed")

	// Change cvar incase they set it too high or too low
	if ( entSpeed > 2000.0 ) {
		debugMessage("[SH](Super Saiyan Gohan) ssjgohan_powerspeed cvar must not be set higher then 2000, defaulting to 2000", 0, 0)
		entSpeed = 2000.0
		set_cvar_float("ssjgohan_powerspeed", entSpeed)
	}
	else if ( entSpeed < 500.0 ) {
		debugMessage("[SH](Super Saiyan Gohan) ssjgohan_powerspeed cvar must not be set lower then 500, defaulting to 500", 0, 0)
		entSpeed = 500.0
		set_cvar_float("ssjgohan_powerspeed", entSpeed)
	}

	entOrigin[0] = floatround(fl_Origin[0])
	entOrigin[1] = floatround(fl_Origin[1])
	entOrigin[2] = floatround(fl_Origin[2])

	get_user_origin(id, AimVec, 3)

	new distance = get_distance(entOrigin, AimVec)

	// Stupid Check but lets make sure you don't devide by 0
	if ( !distance ) distance = 1

	new Float:Speed = entSpeed / distance

	fl_Velocity[0] = (AimVec[0] - fl_Origin[0]) * Speed
	fl_Velocity[1] = (AimVec[1] - fl_Origin[1]) * Speed
	fl_Velocity[2] = (AimVec[2] - fl_Origin[2]) * Speed

	Entvars_Set_Vector(newEnt, EV_VEC_velocity, fl_Velocity)

	new iNewVelocity[3], args[6]
	iNewVelocity[0] = floatround(fl_Velocity[0])
	iNewVelocity[1] = floatround(fl_Velocity[1])
	iNewVelocity[2] = floatround(fl_Velocity[2])

	// Pass varibles used to guide entity with
	args[0] = id
	args[1] = newEnt
	args[2] = floatround(entSpeed)
	args[3] = iNewVelocity[0]
	args[4] = iNewVelocity[1]
	args[5] = iNewVelocity[2]

	set_task(0.1, "guide_kamehameha", newEnt, args, 6)

	emit_sound(newEnt, CHAN_STATIC, "shmod/esf_beamhead.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

	// Trail on enity. It's flawed by not being removable, so make it last long.
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
	write_byte(22)		// TE_BEAMFOLLOW
	write_short(newEnt)	// entity:attachment to follow
	write_short(g_spriteTrail)	// sprite index
	write_byte(100)	// life in 0.1's
	write_byte(8)		// line width in 0.1's
	write_byte(255)	//r,g,b
	write_byte(255)
	write_byte(255)
	write_byte(255)	// brightness
	message_end()
}
//----------------------------------------------------------------------------------------------
public guide_kamehameha(args[])
{
	new id = args[0]
	new entID = args[1]
	new speed = args[2]

	if ( !is_valid_ent(entID) ) return

	if ( !is_user_connected(id) ) {
		vexd_pfntouch(entID, 0)
		return
	}

	new Float:fl_Origin[3], AimVec[3]

	get_user_origin(id, AimVec, 3)
	Entvars_Get_Vector(entID, EV_VEC_origin, fl_Origin)

	new iNewVelocity[3], Origin[3], velocityVec[3]
	new  avgFactor, length

	Origin[0] = floatround(fl_Origin[0])
	Origin[1] = floatround(fl_Origin[1])
	Origin[2] = floatround(fl_Origin[2])

	if ( speed < 1000 )
	avgFactor = 6
	else if ( speed < 1500 )
	avgFactor = 4
	else
	avgFactor = 2

	velocityVec[0] = AimVec[0] - Origin[0]
	velocityVec[1] = AimVec[1] - Origin[1]
	velocityVec[2] = AimVec[2] - Origin[2]

	length = sqroot(velocityVec[0]*velocityVec[0] + velocityVec[1]*velocityVec[1] + velocityVec[2]*velocityVec[2])
	// Stupid Check but lets make sure you don't devide by 0
	if ( !length ) length = 1

	velocityVec[0] = velocityVec[0]*speed / length
	velocityVec[1] = velocityVec[1]*speed / length
	velocityVec[2] = velocityVec[2]*speed / length

	iNewVelocity[0] = ( velocityVec[0] + (args[3]*(avgFactor-1)) ) / avgFactor
	iNewVelocity[1] = ( velocityVec[1] + (args[4]*(avgFactor-1)) ) / avgFactor
	iNewVelocity[2] = ( velocityVec[2] + (args[5]*(avgFactor-1)) ) / avgFactor

	new Float:fl_iNewVelocity[3]
	fl_iNewVelocity[0] = float(iNewVelocity[0])
	fl_iNewVelocity[1] = float(iNewVelocity[1])
	fl_iNewVelocity[2] = float(iNewVelocity[2])

	Entvars_Set_Vector(entID, EV_VEC_velocity, fl_iNewVelocity)

	args[3] = iNewVelocity[0]
	args[4] = iNewVelocity[1]
	args[5] = iNewVelocity[2]

	set_task(0.1, "guide_kamehameha", entID, args, 6)
}
//----------------------------------------------------------------------------------------------
#if defined AMX_NEW
public vexd_pfntouch(pToucher, pTouched) {
	entity_touch(pToucher, pTouched)
}

public entity_touch(entity1, entity2) {
	new pToucher = entity1
#else
public vexd_pfntouch(pToucher, pTouched) {
#endif

	if (pToucher <= 0) return
	if (!is_valid_ent(pToucher)) return

	new szClassName[32]
	Entvars_Get_String(pToucher, EV_SZ_classname, szClassName, 31)

	if (equal(szClassName, "ssjgohan_kamehameha")) {
		new id = Entvars_Get_Edict(pToucher, EV_ENT_owner)
		new dmgRadius = get_cvar_num("ssjgohan_radius")
		new maxDamage = get_cvar_num("ssjgohan_damage")
		new Float:fl_vExplodeAt[3]

		Entvars_Get_Vector(pToucher, EV_VEC_origin, fl_vExplodeAt)

		new vExplodeAt[3]
		vExplodeAt[0] = floatround(fl_vExplodeAt[0])
		vExplodeAt[1] = floatround(fl_vExplodeAt[1])
		vExplodeAt[2] = floatround(fl_vExplodeAt[2])


		// Cause the Damage
		new vicOrigin[3], Float:dRatio,  distance, damage
		new players[SH_MAXSLOTS], pnum, vic

		get_players(players, pnum, "a")

		for (new i = 0; i < pnum; i++) {
			vic = players[i]
			if( !is_user_alive(vic) ) continue
			if ( get_user_team(id) == get_user_team(vic) && !get_cvar_num("mp_friendlyfire") && id != vic ) continue

			get_user_origin(vic, vicOrigin)
			distance = get_distance(vicOrigin, vExplodeAt)

			if ( distance < dmgRadius ) {

				dRatio = floatdiv(float(distance), float(dmgRadius))
				damage = maxDamage - floatround(maxDamage * dRatio)

				// Lessen damage taken by self by half
				if( vic == id ) damage = floatround(damage / 2.0)

				// Need hurt sound and small screen shake
				shExtraDamage(vic, id, damage, "Kamehameha")

				// Make them feel it
				new Float:fl_vicVelocity[3]
				fl_vicVelocity[0] = ((vicOrigin[0] - vExplodeAt[0]) / distance) * 300.0
				fl_vicVelocity[1] = ((vicOrigin[1] - vExplodeAt[1]) / distance) * 300.0
				fl_vicVelocity[1] = 150.0

				Entvars_Set_Vector(vic, EV_VEC_velocity, fl_vicVelocity)
				sh_screenShake(vic, 12, 12, 12)
			}
		}


		// Make some Effects
		new blastSize = floatround(dmgRadius / 12.0)

		// Explosion Sprite
		message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
		write_byte(23)			//TE_GLOWSPRITE
		write_coord(vExplodeAt[0])
		write_coord(vExplodeAt[1])
		write_coord(vExplodeAt[2])
		write_short(g_spriteExplosion)	// model
		write_byte(01)			// life 0.x sec
		write_byte(blastSize)	// size
		write_byte(255)		// brightness
		message_end()

		// Explosion (smoke, sound/effects)
		message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
		write_byte(3)			//TE_EXPLOSION
		write_coord(vExplodeAt[0])
		write_coord(vExplodeAt[1])
		write_coord(vExplodeAt[2])
		write_short(g_spriteSmoke)		// model
		write_byte(blastSize+5)	// scale in 0.1's
		write_byte(20)			// framerate
		write_byte(10)			// flags
		message_end()

		// Create Burn Decals, if they are used
		if (get_cvar_num("ssjgohan_blast_decals") == 1) {
			// Change burn decal according to blast size
			new decal_id
			if (blastSize <= 18) {
				//radius ~< 216
				decal_id = g_burnDecal[random_num(0,2)]
			}
			else {
				decal_id = g_burnDecalBig[random_num(0,2)]
			}

			message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
			write_byte(109)		//TE_GUNSHOTDECAL
			write_coord(vExplodeAt[0])
			write_coord(vExplodeAt[1])
			write_coord(vExplodeAt[2])
			write_short(0)			//?
			write_byte(decal_id)	//decal
			message_end()
		}

		// Stop the sounds
		new sndStop=(1<<5)
		emit_sound(pToucher, CHAN_STATIC, "shmod/esf_beamhead.wav", 1.0, ATTN_NORM, sndStop, PITCH_NORM)
		emit_sound(id, CHAN_STATIC, "shmod/ssjgohan_ha.wav", 1.0, ATTN_NORM, sndStop, PITCH_NORM)

		RemoveEntity(pToucher)

		if ( get_cvar_float("ssjgohan_cooldown") > 0.0 ) ultimateTimer(id, get_cvar_float("ssjgohan_cooldown"))

		// Reset the Varible
		g_powerID[id] = 0
		g_usingPower[id] = false

		// Switch back to previous weapon and reset speed...
		if ( g_lastWeapon[id] != CSW_KNIFE ) shSwitchWeaponID(id, g_lastWeapon[id])
		else shResetSpeed(id)
	}
        }
}
//----------------------------------------------------------------------------------------------
public remove_power(id, powerID)
{
	new Float:fl_vOrigin[3]

	Entvars_Get_Vector(powerID, EV_VEC_origin, fl_vOrigin)

	// Create an effect of kamehameha being removed
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
	write_byte(14)		//TE_IMPLOSION
	write_coord(floatround(fl_vOrigin[0]))
	write_coord(floatround(fl_vOrigin[1]))
	write_coord(floatround(fl_vOrigin[2]))
	write_byte(120)	// radius
	write_byte(40)		// count
	write_byte(45)		// life in 0.1's
	message_end()

	// Reset Variables
	g_powerID[id] = 0
	g_usingPower[id] = false

	// Stop the sounds
	new sndStop=(1<<5)
	emit_sound(powerID, CHAN_STATIC, "shmod/esf_beamhead.wav", 1.0, ATTN_NORM, sndStop, PITCH_NORM)
	emit_sound(id, CHAN_STATIC, "shmod/ssjgohan_ha.wav", 1.0, ATTN_NORM, sndStop, PITCH_NORM)

	RemoveEntity(powerID)

	if ( is_user_connected(id) ) {
		// Switch back to previous weapon and reset speed...
		if ( g_lastWeapon[id] != CSW_KNIFE ) shSwitchWeaponID(id, g_lastWeapon[id])
		else shResetSpeed(id)
	}
}
//----------------------------------------------------------------------------------------------
public curweapon(id)
{
	if ( !is_user_alive(id) || g_betweenRounds ) return
	if ( !g_hasSSJGohan[id] || !g_usingPower[id] ) return

	new wpnid = read_data(2)

	if ( wpnid != CSW_KNIFE ) {
		// Knife only when using power
		engclient_cmd(id, "weapon_knife")

		// Make them freeze in place if power created
		if ( g_powerID[id] > 0 ) set_user_maxspeed(id, 1.0)
	}
}
//---------------------------------------------------------------------------------------------- 
public ssjgohan_morph(id) 
{ 
if ( gmorphed[id] || !is_user_alive(id) ) return 

#if defined AMXX_VERSION 
cs_set_user_model(id, "ssjgohan") 
#else 
CS_SetModel(id, "ssjgohan") 
#endif 

// Here is something wrong with this ssjgohan_sound id i hope it help you          
ssjgohan_sound(id)   

// Message 
set_hudmessage(50, 205, 50, -1.0, 0.40, 2, 0.02, 4.0, 0.01, 0.1, 7) 
show_hudmessage(id, "ssjgohan - ssjgohan-SSJ reporting for duty") 

gmorphed[id] = true 
} 
//---------------------------------------------------------------------------------------------- 
public ssjgohan_unmorph(id) 
{ 
if ( gmorphed[id] ) { 
// Message 
set_hudmessage(50, 205, 50, -1.0, 0.40, 2, 0.02, 4.0, 0.01, 0.1, 7) 
show_hudmessage(id, "SSJ - MODE OFF, you returned to normal self.") 

#if defined AMXX_VERSION 
cs_reset_user_model(id) 
#else 
CS_ClearModel(id) 
#endif 

ssjgohan_sound(id) 

gmorphed[id] = false 

if ( get_cvar_num("ssjgohan_teamglow") ) { 
remove_task(id+100) 
set_user_rendering(id) 
         } 
    } 
}  
//---------------------------------------------------------------------------------------------- 
public ssjgohan_glow(id) 
{ 
id -= 100 

if ( !is_user_connected(id) ) { 
//Don't want any left over residuals 
remove_task(id+100) 
return 
} 

if ( gHasssjgohanPower[id] && is_user_alive(id) ) { 
if ( get_user_team(id) == 1 ) { 
shGlow(id, 100, 0, 0) 
} 
else { 
shGlow(id, 0, 0, 100) 
          } 
     } 
}
//----------------------------------------------------------------------------------------------
public round_end()
{
	g_betweenRounds = true

	for ( new id = 1; id <= SH_MAXSLOTS; id++ ) {
		if ( g_hasSSJGohan[id] && g_powerID[id] > 0 ) {
			remove_power(id, g_powerID[id])
		}
	}
}
//----------------------------------------------------------------------------------------------
public round_start()
{
	g_betweenRounds = false
}
//---------------------------------------------------------------------------------------------- 
public AnGeReD_death() 
{ 
new id = read_data(2) 

if ( !gHasSSJGohanPower[id] ) return 

SSJGohan_unmorph(id) 
} 
//----------------------------------------------------------------------------------------------
public client_disconnect(id)
{
	if( g_hasSSJGohan[id] && g_powerID[id] > 0) {
		remove_power(id, g_powerID[id])
		gmorphed[id] = false 
	}
}
//----------------------------------------------------------------------------------------------
dawe is offline
Send a message via MSN to dawe
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 07-21-2006 , 13:48   Re: SSJGOHAN
Reply With Quote #2

make sure the code is spelled (and capitalized) the same way as the globals.
Code:
// GLOBAL VARIBLES
new g_heroName[]="Super Saiyan Gohan"
new bool:g_hasSSJGohan[SH_MAXSLOTS+1]
new bool:gmorphed[SH_MAXSLOTS+1]
new bool:g_usingPower[SH_MAXSLOTS+1]
new bool:g_chargeOver[SH_MAXSLOTS+1]
new bool:g_powerKeyUsed[SH_MAXSLOTS+1]
new bool:g_betweenRounds
new g_powerID[SH_MAXSLOTS+1]
new g_lastWeapon[SH_MAXSLOTS+1]
new g_msgBarTime
new g_spriteSmoke, g_spriteTrail, g_spriteExplosion

new gSSJGohanSound[]="items/suitchargeno1.wav"
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`
dawe
Member
Join Date: Jan 2006
Location: sweden
Old 07-21-2006 , 17:19   Re: SSJGOHAN
Reply With Quote #3

ee ok...can't you just tell me whats wrong! im confusde!:S
dawe is offline
Send a message via MSN to dawe
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 07-21-2006 , 19:24   Re: SSJGOHAN
Reply With Quote #4

Read the errors, they tell you whats wrong;

new gSSJGohanSound[]="items/suitchargeno1.wav"
sh_ssjgohan.sma(100) : error 017: undefined symbol "gssjgohanSound"
sh_ssjgohan.sma(629) : error 017: undefined symbol "ssjgohan_sound"
sh_ssjgohan.sma(651) : error 017: undefined symbol "ssjgohan_sound"

none of those variable names match to the one you created.
Freecode is offline
dawe
Member
Join Date: Jan 2006
Location: sweden
Old 07-22-2006 , 06:08   Re: SSJGOHAN
Reply With Quote #5

okok i have look at that but i still don't get it!!!

Last edited by dawe; 07-23-2006 at 13:09.
dawe is offline
Send a message via MSN to dawe
unbeknowNst
Junior Member
Join Date: Jun 2006
Old 07-27-2006 , 17:23   Re: SSJGOHAN
Reply With Quote #6

Make sure it all matches each other and etc. Like...

gHasSSJGOHAN <--- it has to be exactly like this if this was the first one you set it like

NOT
ghasssjGohan <--- because it does not match the first.
unbeknowNst is offline
Send a message via AIM to unbeknowNst
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 21:48.


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